Skip to main content
Glama

skim_patch

Apply edited text to a specific anchored span in a skimmed file, ensuring the file hasn't changed since expansion. Newlines are preserved and a new handle is returned.

Instructions

Replace exactly one anchored span (or literal "L-" range) of a skimmed file on disk.

This is what verbatim-in-context buys: the span you expanded IS what the file contains, so an edit built from it applies safely. Expand the span first, edit that exact text, then patch. The write is refused if the file on disk no longer matches this handle's snapshot (drift -> clean error; re-open and rebuild the patch). Newline style (LF/CRLF) is preserved, the result is re-skimmed and verified, and a fresh handle for the new content is returned. Set SKIM_PATCH_DISABLED=1 to turn this tool off for read-only mounts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anchorYes
handleYes
new_textYes
Behavior5/5

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

No annotations provided, so description carries full burden. It discloses drift detection, newline preservation, re-skimming verification, fresh handle return, and the disable flag. This is comprehensive for a mutation tool.

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

Conciseness5/5

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

Concise yet thorough. First sentence immediately states purpose, followed by workflow, conditions, and behavioral details. No superfluous sentences.

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?

Given no output schema and moderate complexity, description covers error conditions (drift), side effects (newline preservation, re-skimming), and returned handle. Also mentions the environment variable for disabling. Very complete.

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 0%, so description must compensate. It partially explains 'anchor' as 'anchored span (or literal range)', but handle and new_text are not explicitly described beyond context. Could be improved with direct parameter explanations.

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?

Description explicitly states the action: 'Replace exactly one anchored span (or literal range) of a skimmed file on disk.' It clearly distinguishes from sibling tools like skim_open, skim_expand, etc., by specifying it is for patching a specific span after expansion.

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?

Provides explicit workflow guidance: 'Expand the span first, edit that exact text, then patch.' Also explains when the tool refuses (drift) and how to handle it ('re-open and rebuild the patch'), plus the environment variable to disable it for read-only mounts.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/helloderekg/skim-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server