Skip to main content
Glama

patch

Apply a unified diff patch to text, producing the transformed output. Returns the patched text. Requires a valid API key (Bearer token); billing is per combined input characters. To generate a diff, use diff.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesOriginal text to apply the patch to.
patchYesUnified diff patch text.

TDQS

A4.5/5.0
Behavior4/5

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

All annotations are false (readOnlyHint, destructiveHint, etc.), so the description carries the full burden of behavioral disclosure. It discloses that the tool requires authentication and incurs billing, and that it transforms input text. It does not explicitly mention error handling on invalid patches, but it covers the essential behavioral aspects beyond what annotations provide. This is adequate though not exhaustive.

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?

The description is four concise sentences, front-loaded with the core action first, then the return value, then requirements, then the alternative. Every sentence serves a purpose with no fluff. The structure is ordered logically for an agent to quickly grasp what the tool does and how to use it.

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?

For a simple two-parameter tool with no output schema, the description covers all necessary operational details: the action, return value, authentication and billing, and the related sibling tool. It gives the agent enough to call the tool correctly without missing critical information. There is no requirement for more detail given the tool's simplicity.

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 description coverage is 100%, with both 'text' and 'patch' already described in the input schema. The tool description adds minimal extra semantics—only the billing note relates to the inputs. Since the schema already provides the meaning, the baseline of 3 is appropriate; the description doesn't significantly enhance parameter understanding.

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?

The description states a clear verb and resource: 'Apply a unified diff patch to text, producing the transformed output.' It specifies the operation (apply patch) and result (patched text), and explicitly distinguishes from the sibling tool by saying 'To generate a diff, use `diff`.' This makes the tool's purpose unambiguous and differentiates it from all listed siblings.

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?

The description provides explicit guidance: it tells the agent when to use this tool (when applying a patch) and when to use an alternative ('To generate a diff, use `diff`'). It also includes operational requirements (valid API key, billing per combined input characters), which are critical for correct invocation and cost-awareness. This is clear and actionable.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool performs a distinct operation: conversion, diffing, patching, pruning, llms.txt generation, validation, and cost estimation. The descriptions explicitly cross-reference related tools (diff/patch, generate/validate), which further prevents misselection.

Naming Consistency5/5

All seven tools use lowercase single-word imperative verbs (convert, diff, estimate, generate, patch, prune, validate), forming a consistent and predictable naming convention.

Tool Count5/5

Seven tools is within the ideal range and every tool has a clear purpose. The set is compact rather than sprawling, with no redundant or filler tools.

Completeness4/5

The paired workflows are complete: diff/patch, generate/validate, and convert/prune cover their stated operations without dead ends. The main gap is that the estimate workflow points to an external pricing endpoint for supported models rather than exposing model/pricing lookup as a first-class tool, which is a minor obstacle.

Resources