Skip to main content
Glama

lesson_patch

Destructive

Replace a unique substring in a stored lesson to correct or update its content while preserving the heading, summary, provenance, and timestamps.

Instructions

Replace one unique substring in a materialized lesson.

old_string must occur exactly once within the lesson's markdown body. The operation preserves the lesson's heading, summary, provenance, and timestamps, unlike a wholesale lesson_append replacement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes
new_stringNo
old_stringYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false; the description adds value by spelling out that heading, summary, provenance, and timestamps are preserved, so the agent understands the blast radius. It leaves failure behavior for non-unique or missing substrings implicit, but the uniqueness statement hints at the contract.

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?

Two concise, front-loaded sentences; the first states the action and the second adds the constraint and differentiation. There is no filler or repetition of schema fields.

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?

The tool has annotations, an output schema, and a clear sibling contrast, so the description covers the high-risk aspects: destructive edit, scope (unique substring), and metadata preservation. It could be slightly more explicit about empty new_string behavior and non-uniqueness errors, but it is adequate for selection and normal invocation.

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 0%, so the description carries the burden for parameter meaning. It explains old_string's uniqueness requirement and implies new_string is the replacement, but it does not explicitly state that an empty new_string deletes the substring or clarify slug scope beyond the operation.

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 opens with 'Replace one unique substring in a materialized lesson,' a specific verb plus resource that clearly identifies a surgical edit operation. It also includes a uniqueness constraint and calls out what it preserves, separating it from the sibling lesson_append.

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?

It states a concrete precondition ('must occur exactly once within the lesson's markdown body') that an agent must verify before calling. It also names the alternative lesson_append and contrasts the patch behavior with wholesale replacement, giving clear routing guidance.

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

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/po4erk91/thread-keeper'

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