Skip to main content
Glama

Apply recommended fixes

apply_fixes
Idempotent

Applies MCP security fixes to project files: adds permission rules, pins package versions, replaces secrets with references. Preview changes before writing.

Instructions

Fixes findings in the project's own files. permissions: adds the recommended permissions.ask rules for tools that execute code, delete data or write files to .claude/settings.json (needs confirm_launch, because the servers are listed to classify their tools). pin-versions: pins unpinned npx/uvx packages in .mcp.json to the registry's current version (needs confirm_network). env-refs: replaces literal secrets in .mcp.json env/headers with ${VAR} references. Without write=true it only shows the planned edits. Every written file is backed up under ~/.claude/mcp-security/backups/ first; ~/.claude.json is never modified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fixesYes
writeNofalse = dry run. Show the plan to the user first, then call again with write=true after they agree.
serversNoServers considered for the permissions fix.
project_dirNo
confirm_launchNo
confirm_networkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Despite annotations already covering safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true), the description adds substantial non-obvious behavior: exactly which files are touched (.claude/settings.json, .mcp.json), that every written file is backed up, and crucially that ~/.claude.json is never modified. This is high-value disclosure beyond structured data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but well front-loaded: the core purpose leads, followed by per-fix behavior and the dry-run/backup safety notes. Almost every sentence earns its place, though the parenthetical explanations add slight length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating, open-world tool with no output schema, the description covers the files modified, the dry-run default, prerequisites, and backup behavior. Only project_dir lacks an explanation, a minor gap given the overall thoroughness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema coverage at only 33%, the description compensates well: it explains each value of the fixes enum and their effects, the write=true semantics, confirm_launch and confirm_network meanings, and the servers param's role in the permissions fix. Only project_dir is left undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (fixes) and resource (findings in the project's own files), then enumerates the three concrete fix categories it applies. This cleanly distinguishes it from sibling tools like audit_mcp_config and generate_policy, which diagnose or produce recommendations rather than mutate files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit conditions per fix type (permissions needs confirm_launch; pin-versions needs confirm_network) and a clear dry-run workflow: call without write=true first, then confirm. It doesn't name specific sibling alternatives to use before/after, but the prerequisites are unusually well specified.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.