Skip to content

Add description and parameters to MCP server config#7

Merged
viamus merged 1 commit intomainfrom
feature/mcp-description-and-params
Feb 28, 2026
Merged

Add description and parameters to MCP server config#7
viamus merged 1 commit intomainfrom
feature/mcp-description-and-params

Conversation

@viamus
Copy link
Owner

@viamus viamus commented Feb 28, 2026

Summary

  • Added description and parameters fields to McpServerConfig for documenting MCP server tools in YAML pipelines
  • Created McpContextBuilder static helper that generates a ## Available MCP Tools Markdown section, automatically appended to the system prompt in StepBuilder
  • These fields are YAML-only metadata — they are not sent to the Claude CLI --mcp-config JSON
  • Template resolution ({{variables}}) works in description and parameter texts

YAML Example

mcp_servers:
  jira:
    command: "npx"
    args: ["-y", "@anthropic/mcp-jira"]
    description: "Search and manage Jira tickets"
    parameters:
      project_key:
        description: "The Jira project key"
        example: "PROJ-123"
    env:
      JIRA_TOKEN: "{{jira_token}}"

Generated System Prompt Section

## Available MCP Tools

### jira

Search and manage Jira tickets

**Parameters:**

- `project_key`: The Jira project key (example: `PROJ-123`)

Files Changed

File Change
McpServerConfig.cs Added McpParameterConfig class, Description and Parameters fields, updated ResolveTemplates
McpContextBuilder.cs New — builds Markdown tool documentation for system prompt
StepBuilder.cs Calls McpContextBuilder.Build() and appends to system prompt
McpServerConfigTests.cs +5 tests for new ResolveTemplates behavior
McpContextBuilderTests.cs New — 9 unit tests
PipelineConfigLoaderTests.cs +1 YAML round-trip test
README.md Added MCP Server Tools section
CLAUDE.md New — developer context file

Test plan

  • All 111 tests pass (dotnet test)
  • Verify YAML with description/parameters deserializes correctly
  • Verify system prompt contains MCP tool documentation when servers have metadata
  • Verify --mcp-config JSON does NOT contain description/parameters

🤖 Generated with Claude Code

MCP servers now support `description` and `parameters` fields in YAML.
These are injected into the system prompt via McpContextBuilder so the
LLM knows when and how to use each tool. The fields are YAML-only
metadata and are not written to the --mcp-config JSON.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@viamus viamus merged commit 32ccb41 into main Feb 28, 2026
1 check passed
@viamus viamus deleted the feature/mcp-description-and-params branch February 28, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant