Skip to main content
Glama

Fix a page that is mostly code

fix_mostly_code
Read-onlyIdempotent

A fix plan for PAGE_IS_MOSTLY_CODE: the homepage's measured bytes by category, the largest blocks with what to do with each, ordered steps with the text ratio after each, and the step at which the detector would stop firing - or, when moving code cannot clear it, how much markup to cut or text to add. Give domain (fetched now) or id (a stored scan).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fix_mostly_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoReport id: plan from the stored scan instead of fetching
domainNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description still adds real behavior: the output is a diagnostic plan with per-block recommendations and a simulated stopping step, and crucially it distinguishes a live fetch ('domain (fetched now)') from replaying a stored scan ('id'), which tells the agent this may hit the network. It does not say what happens if neither or both inputs are supplied.

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?

The purpose and the return contents are front-loaded in one dense sentence, followed by a short input rule. Nearly every clause carries information, though the single long sentence with multiple comma-separated output elements is heavier than it needs to be and could be split for faster parsing.

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?

There is no output schema, so the description must carry the return shape and it does so thoroughly: byte breakdown, largest blocks with actions, ordered steps with post-step ratios, and the detector stop point plus fallback guidance when code movement is insufficient. Inputs are framed as alternatives. The remaining gap is the unaddressed zero-argument case and no hint about fetch cost or latency for a live domain pull.

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

Parameters3/5

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

Schema coverage is 50% — id is documented in the schema, domain is bare. The description does add meaning to both by framing them as mutually alternative sources (live fetch vs stored scan), which is not in the schema. However, with zero required parameters, the definition never says which source wins when both are given or what happens when neither is, leaving a genuine ambiguity.

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?

The description names the exact detector finding (PAGE_IS_MOSTLY_CODE) and enumerates the artifact it returns: measured bytes by category, largest blocks, ordered steps, and the stop point. That is more specific than the title's 'fix a page that is mostly code' and clearly separates it from siblings like fix_robots or fix_entitymap, which target other findings. It stops short of 5 only because the operative verb ('returns a fix plan') is implied rather than stated directly.

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?

The final sentence gives a source selection rule ('domain (fetched now) or id (a stored scan)'), which is useful context, but there is no statement of when an agent should reach for this tool versus explain_finding or a full scan_domain run, and no note that a stored scan may be stale relative to a live fetch. Usage is implied by the finding code rather than spelled out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.