Repository navigation
Description
Problem
CONST_MCP_EXPOSURE_TABLE marks pr_check_readiness as read-only. Its --auto-resolve option resolves review threads on GitHub. That is a write. A role server that selects tools by the read-only flag would offer a write to a model.
Found by the agent that built the role-scoped MCP servers (#3219, PR #3233). That change leaves pr_check_readiness out of every job role table to stay safe.
Evidence
src/devops_cli/config/constants.py: thepr check-readinessrow ofCONST_MCP_EXPOSURE_TABLE.devops pr check-readiness --helplists--auto-resolve.
Fix
Mark the tool as not read-only, or remove --auto-resolve from the published schema. Add a check that fails when a read-only tool has an option whose help text says it resolves, writes, deletes or creates.
Acceptance criteria
- No tool with a write option is flagged read-only.
- A test reads the published schema of every read-only tool and fails on a write option.
Alternatives check of 2026-11-05: none.
Tool: none found.
Proposed design
Problem statement
The MCP exposure table marks pr check-readiness as read-only, but the command has a --auto-resolve option that resolves review threads. The published schema decides whether a role server can pass that option. No test checks that a read-only tool's published schema has no write option. The stage job found that the issue premise does not hold at the staging commit, so the change must test the schema and align the flag with it.
Acceptance criteria
Requirement: Readiness flag follows published schema
The pr check-readiness row of CONST_MCP_EXPOSURE_TABLE SHALL set its read-only flag to False when the published MCP schema exposes the auto_resolve option, and to True when the schema omits it.
Scenario: Flag matches auto_resolve exposure
- WHEN the test reads the
pr check-readinessrow and the published MCP schema - THEN the read-only flag is
Falseexactly when the schema includesauto_resolve
Requirement: Auto-resolve option stays available
The pr check-readiness command SHALL keep the --auto-resolve option for CLI callers.
Scenario: CLI help lists auto-resolve
- WHEN the help of
pr check-readinessis read - THEN the help lists
--auto-resolve
Requirement: Read-only tools reject write options
A test SHALL read every read-only tool's published schema and fail on a case-insensitive word match of a write verb in an option description.
Scenario: Write verb in a read-only schema
- WHEN a read-only tool has an option description with
resolve,write,deleteorcreate, or an inflection - THEN the test fails and names the tool and the option
Requirement: Current read-only schemas pass
The published schemas of the read-only tools SHALL pass the write-option test with the current CONST_MCP_EXPOSURE_TABLE.
Scenario: Current table passes
- WHEN the write-option test runs against the current
CONST_MCP_EXPOSURE_TABLE - THEN the test passes
Existing Tool Considered
No open, maintained tool covers the need. The alternatives check found none: general MCP security scanners validate annotation fields or scan a running server, and none reads this repository's CONST_MCP_EXPOSURE_TABLE or its generated FastMCP schema option help text. The change builds a repository-specific invariant test. Written cost: about 5,000 tokens and under two hours to build, keep and fix.
Key questions
- Should
pr check-readinessbe marked not read-only, or should--auto-resolveleave the published schema?: Neither unconditionally. The test SHALL compare the table's read-only flag with the published schema. Set the flag toFalsewhen the schema exposesauto_resolve; keepTruewhen the schema omits it. Keep the CLI option. This avoids a false premise and makes the flag match what a role server can call. (best practice) [sources: src/devops_cli/config/constants.py, src/devops_cli/ai/mcp/generator.py, src/devops_cli/commands/pr.py]- Chosen: Schema-driven flag. The stage job found the premise does not hold at the staging commit, so the proposal cannot assume that the schema exposes
auto_resolve. The test sets the flag from the schema. - Rejected: Always mark not read-only. This changes the flag even when the published schema omits the write option, and it repeats the premise that the stage job rejected.
- Rejected: Remove auto_resolve from the published schema. This hides a real CLI write and removes a capability. If the schema already omits the option, it changes nothing.
- Chosen: Schema-driven flag. The stage job found the premise does not hold at the staging commit, so the proposal cannot assume that the schema exposes
- What rule detects a write option in a read-only tool's published schema?: Scan every option description in each read-only tool's published schema. Fail on a case-insensitive word match of
resolve,write,deleteorcreate, or an inflection. Name the tool and the option. (best practice) [sources: src/devops_cli/config/constants.py, src/devops_cli/ai/mcp/generator.py, tests/ai/mcp/test_fastmcp_contracts.py]- Chosen: Scan option descriptions for write verbs. The issue defines the signal as help text, and the schema copies it into option descriptions. It catches
--auto-resolveand neutral option names. - Rejected: Scan option names only. A neutral name such as
--auto-resolvestill writes, and a name can mislead. - Rejected: Scan only
pr check-readiness. The invariant covers every read-only tool, and the issue asks for that test.
- Chosen: Scan option descriptions for write verbs. The issue defines the signal as help text, and the schema copies it into option descriptions. It catches
- Where does the test get the published schema?: The MCP generator builds the published schema from
CONST_MCP_EXPOSURE_TABLE. The test reads that generated schema, not the table alone or the CLI help text. [sources: src/devops_cli/ai/mcp/generator.py, src/devops_cli/config/constants.py] - What does
CONST_MCP_EXPOSURE_TABLEhold forpr check-readinessat the refined commit?: The row holdsTruefor the read-only flag at commit 7072e35. The stage job found the premise does not hold at the staging commit, so the test must read the generated schema and not trust this row alone. [sources: src/devops_cli/config/constants.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 2, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(mcp)scope of the title gives the scope.A misclassified tool can expose a write to a model expecting read-only, but it is a single entry fix with a clear scope.Correct tool classification prevents role servers from offering unintended write operations.One constant entry change plus one validation test.Both address MCP tool safety classification; #857 adds ToolAnnotations and an approval flow, while this candidate fixes the exposure table flag and adds a schema validation test.devops-cli-service commentedon Nov 2, 2026
Status set to Ready at 7072e35 (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.
Evidence:
x
devops-cli-service commentedon Nov 5, 2026
Alternatives check: none
Tool: none found
Lacks:
Searches run:
Sources:
Checked on 2026-11-05. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 5, 2026
Status set to Ready at d254410 (see proposed design in issue body).
devops-cli-service commentedon Nov 5, 2026
Released in v0.62.6: https://github.com/dan-petty/devops-cli/releases/tag/v0.62.6
devops-cli-service commentedon Nov 5, 2026
Live since 2026-11-05 16:42 UTC