Static source inference · medium confidence · detected: Logging
Deprecated protocol patterns detected
Summary
The server defines 6 tools with complete JSON Schema input definitions and basic descriptions. However, descriptions are minimal (50-100 chars), lack LLM guidance on when to use each tool vs. others, and do not explain state-changing semantics. Parameters have types but many lack detailed usage guidance. Output schemas are not documented anywhere. Error handling exists (validateAdditionalArgs) but error messages returned to the LLM are not visible in the provided code. No per-tool output schema definitions. The argument validation is a security positive but not sufficient to overcome definition gaps. Tools follow verb_noun naming (bazel_build, bazel_query, etc.) which is good, but descriptions are template-like and don't differentiate intent or downstream usage.
All tool descriptions are 50-100 characters and lack actionable guidance. 'Build specified Bazel targets' does not explain when to use this instead of bazel_query or bazel_fetch_dependencies, what the return value contains, or whether the operation is idempotent/retryable.
No output schema documented for any tool. The code shows runBazelCommand returns {stdout, stderr}, but this is inferred from implementation, not declared in the Tool definition. LLMs cannot plan what to do with the result (parse JSON, extract lines, regex match, etc.).
Expand all tool descriptions to 150-250 characters. Include: (1) What does it do? (2) When to call it instead of similar tools? (3) What does it return? Example: 'Build Bazel targets. Use this to compile code (vs bazel_query_target for reading deps). Returns build log, error messages, and list of generated artifacts. Not idempotent, retrying a failed build may produce different errors if dependencies changed.'
Add explicit output schemas to each Tool definition. E.g. bazel_build_target should document: { type: 'object', properties: { stdout: { type: 'string' }, stderr: { type: 'string' }, exitCode: { type: 'number' }, targetsBuild: { type: 'array', items: { type: 'string' } } } }. This requires parsing Bazel's output format in the implementation.
Declare destructiveHint/idempotentHint in Tool definitions for bazel_build_target, bazel_test_target, and bazel_fetch_dependencies. E.g. { name: 'bazel_build_target', ..., destructiveHint: true } (or idempotentHint: true if a retry with the same targets is safe).
Add min/max constraints to array parameters. E.g. bazel_build_target's 'targets' array: minItems: 1, maxItems: 100, description: '... (1 - 100 targets per call; use batch variants to build more).'
Enhance bazel_set_workspace_path to validate the workspace path. Check for BUILD or WORKSPACE file presence before accepting it. Return an error with actionable guidance: 'Path /foo/bar is not a Bazel workspace. Did you mean: /foo/bar/project_1, /foo/bar/project_2? (dirs with WORKSPACE file found nearby).'
Spec posture evidence
Inferred effective spec: <=2025-11-25.
Relies on Logging (deprecated) - log to stderr or use OpenTelemetry
Score history
Overall score trend
↑ 55 points across a rubric change (v1 → v2)
55/100
Scored
Grade
Overall
Spec posture
Rubric
2026-09-22
D
55
<=2025-11-25
v2
2026-03-09
F
0
-
v1
bazel_build_target and bazel_test_target are destructive/side-effecting operations (invoke external processes) but lack destructiveHint or idempotentHint annotations. Tool definitions do not declare these semantics, LLMs cannot know whether retrying is safe.
Parameter descriptions lack detail. 'List of Bazel targets to build (e.g. ...)' gives format but not: whether empty array is valid, how many targets are reasonable, whether order matters, or what happens if a target does not exist.
bazel_set_workspace_path has no validation that the path exists or is a valid Bazel workspace (no BUILD or WORKSPACE file check). Error messages from failed path validation will not guide the LLM on next steps.
No error classification or recovery guidance in tool definitions. When bazel_build_target fails, the tool returns {stdout, stderr} as plain text. No actionable errors like 'Target not found. Did you mean: //path/to:target_1, //path/to:target_2?' or 'Build failed due to compilation error (retryable) vs missing dependency (user must fix).'
bazel_query_target accepts a free-form 'pattern' string but does not validate Bazel query syntax or provide enum/pattern constraint. LLMs can pass invalid patterns like 'deps(' (unclosed) or '@//foo' (invalid syntax).
bazel_list_targets and other tools support optional 'additionalArgs' parameter to pass arbitrary Bazel flags, but descriptions do not warn that these can cause unexpected behavior (e.g., --verbose_failures can produce enormous output, --noprofile can disable caching). No guidance on safe vs. risky flags.
Implement structured error messages returned from tools. Instead of raw stderr, parse Bazel's error output and return JSON: { success: false, error_type: 'target_not_found' | 'compilation_error' | 'timeout', message: '...', suggestion: '...' }. This lets LLMs self-correct with a single retry.
Add a 'Bazel Query Language' reference or examples to bazel_query_target's pattern parameter description. E.g. 'Pattern must be valid Bazel query syntax: deps(//target), attr(name, regex, //search_root), kind(cc_library, //foo:*). See https://bazel.build/query/language.'
Document which additionalArgs are safe (e.g., --verbose_failures, --keep_going, --output=json) vs. risky (--sandbox_debug can break builds, --experimental_* flags are unstable). Add a description: 'Additional Bazel flags. Recommended: --verbose_failures, --keep_going, --output=json. Avoid: --sandbox_debug, experimental flags.'
For bazel_list_targets, document the expected output format (one target per line, or JSON if --output=json is passed). Currently, the raw Bazel output is unclear for LLM parsing.
Add idempotency guidance to all tool descriptions. E.g. 'Calling bazel_build_target twice with the same targets is safe (cached); passing a different target is a separate operation.' This prevents agents from unnecessarily deduplicating calls.