Skip to content

fix(ai): fix MCP ai_benchmark models description #2743

Closed

Description

@dan-petty

Problem Description

The help text of the option --models of devops ai benchmark (HELP.benchmark.models in src/devops_cli/lang/en/help.py) gives the example llama3.1:8b@http://gpu2:11434. The MCP tool ai_benchmark publishes this text as the description of its models parameter. The tool refuses a model@url entry since #2638, so the example in the schema is one that the tool always refuses. A model that copies it gets an error. The text ends with "The MCP tool refuses a model@url.", but the example comes first and the rest of the text is about a form that the tool does not accept.

Evidence

Expected

The description of models in the MCP schema gives plain model names only, and says nothing of model@url or of the key and server rules for it. The help text of the command keeps the model@url form for a person. Test with the published schema of the tool.

Proposed design

Problem statement

The MCP tool ai_benchmark publishes the CLI help text of --models as the description of its models parameter. That text gives the example llama3.1:8b@http://gpu2:11434 and explains the key and server rules for model@url. Since #2638 the tool refuses a model@url entry, so a model that copies the example gets an error. The description must show only plain model names, and a test must verify the published schema.

Acceptance criteria

Requirement: MCP models description omits model@url

The description of the models parameter in the ai_benchmark MCP tool MUST NOT contain the string model@url or the key and server rules text for it.

Scenario: published schema has no model@url

  • WHEN the published schema of ai_benchmark is read and the models parameter description is inspected
  • THEN the description contains no occurrence of model@url and no sentence about api_base_url, gateway_url or provider API key rules

Requirement: CLI help keeps model@url

The help text of the --models option of devops ai benchmark SHALL keep the model@url form and its explanation for a person.

Scenario: CLI help still shows model@url

  • WHEN the help text of --models of devops ai benchmark is read
  • THEN the text contains the example llama3.1:8b@http://gpu2:11434 and the sentence about the MCP tool refusing a model@url

Requirement: Test verifies published schema

A test SHALL read the published schema of the ai_benchmark tool and assert that the models parameter description contains no model@url.

Scenario: test asserts no model@url in schema

  • WHEN the test suite runs the schema verification test for ai_benchmark
  • THEN the test passes when the description has no model@url and fails when it does

Existing Tool Considered

No check has run. The change is a text fix in the project's own FastMCP tool registration and a test. No open, maintained tool or library covers the need of correcting a description string in the project's own MCP server code. The project builds and keeps this code itself.

Key questions

  • Where does the MCP tool ai_benchmark get its models parameter description from?: The MCP tool registration code reads the help text from HELP.benchmark.models in src/devops_cli/lang/en/help.py and publishes it as the parameter description. The issue body confirms: 'The MCP tool ai_benchmark publishes this text as the description of its models parameter.' [sources: src/devops_cli/lang/en/help.py, docs/MCP_TOOLS.md]
  • How should the MCP tool description differ from the CLI help text?: Add a separate description string for the MCP tool's models parameter that gives plain model names only (e.g. 'qwen2.5:0.5b,llama3.1:8b') and says nothing of model@url or the key and server rules. The CLI help text keeps the full text with model@url. The MCP tool registration code uses the shorter description instead of reading HELP.benchmark.models directly. (best practice) [sources: src/devops_cli/lang/en/help.py, docs/MCP_TOOLS.md]
    • Rejected: Override the description in the MCP tool registration code. Chosen. The MCP tool registration is the point where the description is set for the schema. A separate string there keeps the CLI help intact and makes the MCP description explicit and testable.
    • Rejected: Add a models_mcp field to BenchmarkCommandHelp. Rejected. It adds a second field to the help catalog for a value that only the MCP tool uses. The MCP registration code is the natural place to set its own parameter descriptions.
    • Rejected: Strip model@url text from the shared help string at publish time. Rejected. Parsing and removing sentences from a shared string is fragile and hard to test. A dedicated string is clearer.
  • What should the test verify and how?: The test reads the published schema of ai_benchmark (via the MCP server's tool definitions or devops mcp export-schemas) and asserts that the models parameter description does not contain the substring model@url. This is the same kind of contract test that fix(ai): the mcp tool ai_benchmark takes file paths from the model #2704 added for unpublished flags, extended to read an example value in the description. (best practice) [sources: docs/MCP_TOOLS.md]
    • Rejected: Read the published schema and assert no model@url in the models description. Chosen. The issue says 'Test with the published schema of the tool.' This directly verifies what a model client sees.
    • Rejected: Assert on the help string in help.py. Rejected. The help string is allowed to contain model@url for the CLI. The test must target the MCP schema, not the CLI help.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    scope/ai
    status/new
    value/medium
    effort/low
    on Oct 30, 2026
  2. dan-petty commented on Oct 30, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/ai. The (ai) scope of the title gives the scope.
    • Priority: P2-Medium. The schema example causes an AI model to receive an error, but the fix is a text change with no security impact.
    • Value: Medium. Any model that copies the example fails, which breaks a documented workflow for AI callers.
    • Effort: Low. The change is to edit one help string and the MCP schema description, then add a test against the published schema.
    • Related: fix(ai): a server url that the mcp tool ai_benchmark gets from the model reaches loopback with post requests #2638, which asks for a different change. Both concern the ai_benchmark MCP tool's models parameter; #2638 added the refusal of model@url entries, and this candidate fixes the schema text that still shows that form as an example.
  3. added
    priority/p2-medium
    on Oct 30, 2026
  4. added
    status/ready
    and removed
    status/new
    on Oct 30, 2026
  5. devops-cli-service commented on Oct 30, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 7c931b9 (see proposed design in issue body).

  6. devops-cli-service commented on Nov 2, 2026

    @devops-cli-service
    Contributor

    Staged: branch fix/2743-the-mcp-ai-benchmark-schema-shows, draft pull request #3164. The pull request plans the item and closes no issue.

    The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:

    1. Publish plain model names in the ai_benchmark schema: 19054 tokens
  7. added 2 commits that reference this issue on Nov 2, 2026
  8. removed
    status/ready
    on Nov 2, 2026
  9. 31 remaining items

  10. added
    status/planned
    and removed
    status/blocked
    on Nov 4, 2026
  11. devops-cli-service commented on Nov 4, 2026

    @devops-cli-service
    Contributor

    Cleared the stop at group 1 by the rule digest: the runner image changed since the stop, from sha256:eb2c32f9c27c350eafb35b7f08c274621a0a05b95904b2185c667b9805b0d499 to sha256:ff7f81f8f5902c5ae4e48ed334bc83f842b51afb639ab71be65cb4240daadf01. The item is Planned again, and the Service takes it in the next round. The Service clears a stop one time for each runner image. A new stop on this image waits for a comment implement: retry.

  12. changed the title [-]fix(ai): the mcp ai_benchmark schema shows a model@url example the tool refuses[/-] [+]fix(ai): fix MCP ai_benchmark models description[/+] on Nov 6, 2026
  13. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    The job shortened the title of this item. The summary had 70 characters, and the limit is 60. The type and the scope stay.

  14. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/planned
    status/in-progress
    on Nov 6, 2026
  15. removed
    status/in-review
    owner/agent
    on Nov 6, 2026
  16. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor
  17. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-06 22:09 UTC

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/aisource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions