Skip to main content
Glama

codebrain_polish

Apply targeted transformations to existing text: tighten, shorten, rephrase, formalize, or translate without losing meaning.

Instructions

Apply a targeted transform to existing text — do not regenerate from scratch.

Use this when you have a draft and want it tightened, shortened, rephrased, made more formal, translated, or similar. The system prompt forces the model into transform-mode: it must preserve meaning and structure and only apply the requested change.

Args: text: The existing text to polish. instructions: What transformation to apply (e.g. "shorten to 2 lines", "make tone more formal", "translate to German"). use_brain: If true, prepend .brain/context.md from cwd to the system prompt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
instructionsYes
use_brainNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description effectively explains the transform-mode: preserve meaning and structure, only apply requested change. Also describes the use_brain parameter effect. No mention of destructive or auth details, but adequate for a non-destructive transform.

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?

Two paragraphs plus Args section, concise and clearly structured. The Args section is somewhat redundant with schema titles but adds context. Could be slightly tighter.

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 low complexity and presence of output schema, description covers core behavior adequately. Does not address errors or edge cases, but sufficient for a simple transform tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description adds detailed parameter explanations in Args section, including examples for instructions and behavior for use_brain. This compensates well for the missing schema descriptions.

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 clearly states the tool applies a targeted transform to existing text, not generating from scratch, with specific examples (tighten, shorten, rephrase, formal, translate). This distinguishes it from sibling generation tools like codebrain_generate.

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 tells when to use ('when you have a draft and want it...') and implies not for generation. However, it does not explicitly exclude alternatives or provide when-not-to-use guidance.

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/Tschonsen/CodeBrain'

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