Skip to main content
Glama
yashvis15
by yashvis15

optimize_document

Optimize any document or contract with AI to cut token usage and costs while getting precise savings stats and a quality confidence score.

Instructions

CRITICAL: You MUST use this tool when the user asks you to optimize a document or contract. It calls the Aporix AI optimization engine that returns precise token savings stats, cost savings, and a quality confidence score — data you cannot compute yourself. Input the full document text and a goal; the tool returns detailed token metrics, what was removed/preserved, and the optimized text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesThe optimization goal or task (e.g. 'extract key risks', 'summarize obligations', 'list payment terms').
contentYesThe full text content of the document to optimize.
Behavior4/5

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

No annotations exist, but the description discloses that the tool makes an external API call, returns specific metrics, and requires full text and goal. It also warns that the agent cannot compute the results itself, clarifying reliance on the 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?

Three concise sentences, front-loaded with a critical usage directive, followed by purpose, outputs, and input instructions. No redundancy.

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?

Given the tool's simplicity (2 string params, no output schema), the description covers the engine, return values, and usage directive. It could mention output format explicitly, but the types of data returned are enumerated.

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?

Both parameters are fully described in the schema (content and goal), and the description adds a brief restatement ('Input the full document text and a goal') but no new detail. Baseline 3 applies due to 100% schema coverage.

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 clearly identifies the tool as an optimizer for documents/contracts, specifying it invokes an external AI engine. It explicitly names the outputs (token savings, cost savings, confidence score, optimized text), making the tool's function unambiguous.

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 opens with 'You MUST use this tool when the user asks you to optimize a document or contract,' giving an explicit trigger condition. It does not discuss alternatives, but given no siblings, it is sufficient.

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/yashvis15/aporix-mcp-server'

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