Skip to main content
Glama

fix

Idempotent

Applies mechanical repairs to Open Knowledge Format bundles: strips index frontmatter, rebuilds index lists, normalizes tag spelling, and reorders log entries after merges; preview or write changes.

Instructions

Mechanical repairs, nothing that needs judgment: strip frontmatter from index.md files (§8; the root keeps okf_version), rebuild generated index lists, give each tag its most common spelling, and put log.md sections and entries back in order after a merge (§9). apply=False shows the diff (CLI exit 1 if there is work); apply=True writes, re-lints and returns remaining (CLI exit 1 if errors remain). Like lint, it defaults to where the user is and every bundle there; all=false keeps to one bundle.

Input Schema

NameRequiredDescriptionDefault
allNo
applyNo
bundleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare a non-read-only, non-destructive, idempotent mutation, and the description adds genuinely new behavior: apply=False is a diff-only dry run, apply=True writes, then re-lints and returns a `remaining` field, with CLI exit-code semantics in both modes. The default scope (current location plus every bundle there, narrowed by all=false) is also disclosed. It stops short of saying what happens to partially-fixed files when re-linting still reports errors.

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?

Front-loaded with the scope statement ('nothing that needs judgment') followed by an enumerated list, then a second paragraph on modes and scope. Dense with zero filler, though the bare §8/§9 references are opaque to an agent without the spec, and the two paragraphs mix enumeration, mode semantics, and scope defaults without headings.

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 three-parameter mutation tool with no output schema and no annotation detail beyond hints, the description covers mode semantics, return field (`remaining`), exit-code behavior, and default scoping. Remaining gaps: an unclear `bundle` parameter and no statement about atomicity or what state files are left in if re-linting fails.

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 0%, so the description must carry all parameter meaning, and it largely does: `apply` is fully explained via the false/true contrast, and `all=false` is defined as keeping to a single bundle with the default being all bundles at the current location. `bundle` itself is only inferable from that sentence rather than defined, which keeps this below 5.

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

Purpose4/5

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

Opens with a specific verb framing ('Mechanical repairs, nothing that needs judgment') and then enumerates the exact operations: stripping frontmatter from index.md, rebuilding index lists, normalizing tag spellings, reordering log.md sections. This is far more specific than the bare name 'fix' and implicitly separates it from the detection-oriented 'lint' sibling, though it never names an alternative outright.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the mention 'after a merge (§9)' hints at when log reordering applies, and 'Like lint, it defaults to where the user is' borrows context from a sibling. But there is no explicit statement of when to run fix versus lint (detect vs repair), no prerequisite guidance, and no when-not-to-use clause.

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