Skip to main content
Glama

Fix instructions

yof_fix_prompt
Read-onlyIdempotent

Generates step-by-step fix instructions for a reported security finding, showing secrets only as a prefix plus REDACTED. Use it after yof_check or yof_findings flags a leaked key or fake package.

Instructions

Write step-by-step instructions to fix one finding, with any secret shown only as a short prefix plus REDACTED. Use it after yof_check, yof_check_diff or yof_findings reports a finding; use yof_explain for background on a rule, and yof_verify once the fix is made. For a key rule pass file (and line), which yof reads locally to find the value; for a package rule pass package. A finding_id, or a rule this computer does not know, is sent to yof.io and needs YOF_API_KEY. Returns rule and instructions, plus file, line and still_in_file for a key finding.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "rule_id": "<rule_id>"
    },
    "name": "yof_fix_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoThe file the finding is in, relative to the project root. Required for key rules (secret.*).
lineNoThe line of the finding, to pick one match when the file has several. Optional.
packageNoThe package name. Required for package rules (package.*).
rule_idYesThe rule id of the finding, for example secret.openai or package.lookalike.
finding_idNoA finding id from yof_findings. When set, the instructions come from yof.io and the other fields are ignored.

Output Schema

NameRequiredDescriptionDefault
fileNoThe file (key findings).
lineNoThe line found in the file, or the line passed in.
ruleYesThe rule id.
packageNoThe package (package findings).
finding_idNoThe yof.io finding id, when one was passed.
instructionsYesThe fix instructions, ready to follow.
still_in_fileNoWhether the value is still in the file (key findings).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.3.2
    • changedInput schema / properties / file / description
      Previous value: -"The file the finding is in, relative to the project root."New value: +"The file the finding is in, relative to the project root. Required for key rules (secret.*)."
    • changedInput schema / properties / finding_id / description
      Previous value: -"A finding id from yof_findings (yof.io account findings)."New value: +"A finding id from yof_findings. When set, the instructions come from yof.io and the other fields are ignored."
    • changedInput schema / properties / line / description
      Previous value: -"The line of the finding."New value: +"The line of the finding, to pick one match when the file has several. Optional."
    • changedInput schema / properties / package / description
      Previous value: -"For a package finding: the package name."New value: +"The package name. Required for package rules (package.*)."
    • changedInput schema / properties / rule_id / description
      Previous value: -"The rule id of the finding."New value: +"The rule id of the finding, for example secret.openai or package.lookalike."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "file": {
      +      "description": "The file (key findings).",
      +      "type": "string"
      +    },
      +    "finding_id": {
      +      "description": "The yof.io finding id, when one was passed.",
      +      "type": "string"
      +    },
      +    "instructions": {
      +      "description": "The fix instructions, ready to follow.",
      +      "type": "string"
      +    },
      +    "line": {
      +      "description": "The line found in the file, or the line passed in.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "package": {
      +      "description": "The package (package findings).",
      +      "type": "string"
      +    },
      +    "rule": {
      +      "description": "The rule id.",
      +      "type": "string"
      +    },
      +    "still_in_file": {
      +      "description": "Whether the value is still in the file (key findings).",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "rule",
      +    "instructions"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.3.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, openWorld, non-destructive, but the description adds behavior they cannot convey: secrets are echoed only as a short prefix plus REDACTED, key-rule values are read from local files, and finding_id or unknown rules are sent to yof.io and require YOF_API_KEY. That network/key requirement is critical context an agent would otherwise miss.

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 front-loaded, with purpose first, routing second, parameter rules third, and return shape last. The redaction clause in the opening sentence is slightly awkwardly placed, but no sentence is wasted.

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

Completeness5/5

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

Covers the remote-vs-local execution split, credential requirement, per-rule parameter requirements, and return fields even though an output schema exists. For a five-parameter tool with an open-world network dependency, nothing an agent needs before calling is missing.

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?

Schema coverage is 100%, so baseline is 3, and the description adds rationale beyond the schema text: it explains why file/line matter (yof reads the value locally) and ties finding_id to a remote call needing YOF_API_KEY. It largely restates the per-rule-type requirements the schema already documents, so it does not fully exceed the schema.

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 and resource ('Write step-by-step instructions to fix one finding') and immediately scopes it against siblings (yof_check, yof_check_diff, yof_findings, yof_explain, yof_verify). An agent can tell exactly what this produces and when it is the right call.

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

Usage Guidelines5/5

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

Explicit sequencing: call after a check/diff/findings reports a finding, use yof_explain for rule background, use yof_verify once the fix is made. Both the when-to-use and the named alternatives are present, with no inference required.

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