MCP server for executing Sourcegraph batch changes by processing batch spec files
Single tool 'execute-batch-change-spec' has a basic description but critical gaps in parameter documentation and output schema definition. The tool name is awkwardly phrased (execute_batch_change_spec vs. the more idiomatic apply_batch_change or execute_batch_spec). Parameter 'batchSpecPath' has minimal description ('The local file path of the batch spec ' with trailing space). No output schema is documented, the tool returns unstructured text output without field definitions. Error handling is present but generic (catches errors and returns text). The tool performs a destructive operation (pushing batch changes) but lacks confirmation/dry-run patterns. No input validation beyond type checking. Zod schema is minimal.
Execute (push up to s2) a draft batch change
Parameter description is incomplete and contains trailing whitespace. 'The local file path of the batch spec ' lacks guidance on format, validation, or examples. Should specify: absolute vs. relative paths, file extension (.yaml/.yml), and validation rules.
No output schema documented. Tool returns unstructured text via 'content' array with 'type: text'. LLMs cannot parse or chain results. Should define structured output with fields like 'status', 'batch_id', 'preview_url', 'errors' to enable downstream tool composition.
Destructive operation (pushes batch changes to s2) lacks confirmation or dry-run pattern. Tool should support a 'dry_run' boolean parameter to preview changes before execution, preventing accidental deployments.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 38 | 2026-07-28+ | v2 |
Tool name 'execute-batch-change-spec' is awkwardly phrased. Idiomatic verb_noun pattern would be 'apply_batch_change' or 'execute_batch_spec'. Current name is 27 chars (above p90=27 baseline) and unclear whether it executes or previews.
Credentials (SRC_ACCESS_TOKEN, SRC_ENDPOINT) are injected via environment variables, which is correct. However, error messages expose environment variable names in logs. Should sanitize error output to avoid leaking configuration details.