Skip to main content
Glama
bebopp187-stack

Titan Frameworks (LangChain, LlamaIndex, Ollama, XRPL)

Rewrite Framework Code

rewrite_framework_code
Read-onlyIdempotent

Apply conservative rewrites to update framework code (LangChain, LlamaIndex, Ollama, XRPL) to current APIs, returning a patched file and unified diff. Unsafe call-site transforms are left for manual handling.

Instructions

Apply conservative catalog rewrites (imports/identifiers) to a snippet and return the patched file plus a full unified diff. Use when review_framework_code found hits and you want an applyable file. Leftover lists unsafe call-site transforms (e.g. LLMChain(...)) that stay for a human/agent. Does not execute or submit. Paid tools/call: $0.001 USDC or 1000 drops XRP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesSource to lint before running. Not a stack trace (use diagnose_framework_error)
filenameNoOptional path used only in unified-diff headers
frameworkYesOne of langchain, llamaindex, ollama, or xrpl — the library the snippet is written against

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
diffYes
notesYes
appliedYes
changedYes
filenameYes
leftoverYes
frameworkYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.3/5.0
Behavior5/5

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

Adds meaningful behavior beyond the readOnly/idempotent annotations: it does not execute or submit, it returns a patched file plus full diff, unsafe transforms stay for a human/agent, and it discloses the per-call cost. No contradiction with annotations.

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?

Four sentences deliver purpose, usage, limitations, side-effect safety, and cost with little waste. The 'Leftover lists unsafe call-site transforms' sentence is awkward and slightly ambiguous, so it is not perfectly structured.

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?

With an output schema and strong annotations present, the description covers the key operating constraints: when to use, what is left unchanged, non-execution, and cost. The ambiguity around 'Leftover lists...' is a minor completeness gap, but nothing critical is missing for correct 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 100% and each parameter already has a clear schema description. The description adds some context about rewrite scope and output, but it does not materially extend parameter-level meaning beyond the schema.

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 states a specific verb and resource: apply conservative catalog rewrites (imports/identifiers) to a snippet and return a patched file plus unified diff. It also distinguishes the tool from review_framework_code and other siblings by explaining the output and scope.

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

Usage Guidelines4/5

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

Explicitly says to use when review_framework_code found hits and an applyable file is wanted, and notes that unsafe call-site transforms remain for a human/agent. It lacks an explicit 'do not use when' or named alternative for the leftover cases, but the trigger condition is clear.

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