Skip to content

Conversation

@Aniruddh25
Copy link
Collaborator

Why make this change?

  • Server level description is an important field in MCP configuration. This should be included in release 1.7.
  • Fix to allow boolean properties to be set by environment variables is a requested change.

What is this change?

How was this tested?

PR Pipeline validation.

Copilot AI and others added 2 commits January 30, 2026 16:30
## Why make this change?

MCP clients and agents require high-level behavioral context for servers
via the `initialize` response's `instructions` field. DAB previously had
no mechanism to surface this configurable semantic guidance.

## What is this change?

Added optional `description` field to MCP runtime configuration that
populates the MCP protocol's `instructions` field:

**Configuration model**
- `McpRuntimeOptions` now accepts `description` parameter
- `McpRuntimeOptionsConverter` handles serialization/deserialization

**CLI integration**
- `dab configure --runtime.mcp.description "text"` command support
- Configuration generator validates and persists the value
- Fixed config persistence bug: Added DML tools options to condition
check to ensure MCP configuration updates are properly written to config
file

**MCP server response**
- **Stdio Server**: `HandleInitialize()` retrieves description from
`RuntimeConfig.Runtime.Mcp.Description` and conditionally includes
`instructions` in initialize response when non-empty
- **HTTP Server**: Updated server name to "SQL MCP Server"
- Both servers now use explicit `object` type instead of `var` for
better type clarity

**Testing**
- Added comprehensive unit tests in
`McpRuntimeOptionsSerializationTests` covering:
  - Serialization/deserialization with description
- Edge cases: null, empty strings, whitespace, very long strings (5000+
characters)
  - Special characters: quotes, newlines, tabs, unicode characters
- Backward compatibility with existing configurations without
description field
- Improved assertion order to validate JSON field presence before value
matching
- Consolidated CLI tests: removed duplicate
`TestAddDescriptionToMcpSettings` and renamed
`TestUpdateDescriptionForMcpSettings` to
`TestConfigureDescriptionForMcpSettings`

**Code quality fixes**
- Fixed build errors by removing nullable reference type annotations
(project has nullable disabled)
- Fixed IDE0090 code style error by using target-typed new expression
- Fixed whitespace formatting error by removing trailing whitespace

Example configuration:
```json
{
  "runtime": {
    "mcp": {
      "enabled": true,
      "description": "This MCP provides access to the Products database..."
    }
  }
}
```

## How was this tested?

- [x] Unit Tests
  - 9 serialization/deserialization tests for MCP description field
- 2 CLI configuration tests for description option (consolidated from 3)
  - All existing ConfigureOptionsTests pass (58 tests)
- [x] Build verification - all projects build successfully with no
errors or warnings

## Sample Request(s)

CLI usage:
```bash
dab configure --runtime.mcp.description "This MCP provides access to the Products database and should be used to answer product-related or inventory-related questions from the user."
```

MCP initialize response (when description configured - Stdio Server):
```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "protocolVersion": "2024-11-05",
    "capabilities": { ... },
    "serverInfo": {
      "name": "SQL MCP Server",
      "version": "1.0.0"
    },
    "instructions": "This MCP provides access to the Products database..."
  }
}
```

**Note**: The HTTP server currently only updates the server name to "SQL
MCP Server". Instructions support will be added when the
ModelContextProtocol.AspNetCore library adds support for this field in
future versions.

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JerryNixon <1749983+JerryNixon@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Aniruddh25 <3513779+Aniruddh25@users.noreply.github.com>
Co-authored-by: anushakolan <45540936+anushakolan@users.noreply.github.com>
Co-authored-by: Anusha Kolan <anushakolan10@gmail.com>
Co-authored-by: Aniruddh Munde <anmunde@microsoft.com>
#3054)

… it uses the environment replacement and looks for a true false 1 or 0.

## Why make this change?

Fixes #3053 

Boolean values can't be set using environment variables. This allows
that

## What is this change?

Using custom JsonConverter for bools that if a string is detected it
uses the string serialiser that uses the environment replacement rules.

## How was this tested?

- [ ] Integration Tests
- [x] Unit Tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jerry Nixon <1749983+JerryNixon@users.noreply.github.com>
Co-authored-by: Aniruddh Munde <anmunde@microsoft.com>
@Aniruddh25
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).
@Aniruddh25 Aniruddh25 enabled auto-merge (squash) January 31, 2026 00:48
@Aniruddh25 Aniruddh25 linked an issue Jan 31, 2026 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

@souvikghosh04 souvikghosh04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants