Skip to main content
Glama
ptacr

mcp-mt5

by ptacr

extract_function

Extract a contiguous block of lines into a new helper function. Detects parameters and call site using brace-counting and regex. Set dry_run=false to write changes.

Instructions

Extract a contiguous block of lines into a new helper function.

Brace-counting + regex param detection — not a full AST parser. Returns the proposed helper, call site, and parameter list. Set dry_run=False to write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
dry_runNo
line_endYes
new_nameYes
line_startYes
return_typeNovoid
target_fileNo
Behavior4/5

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

The description discloses key behavioral traits: 'Brace-counting + regex param detection — not a full AST parser,' which alerts the agent to limitations. It also explains the dry_run flag and what the tool returns (proposed helper, call site, parameter list). With no annotations provided, this transparency is valuable.

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: purpose, methodology/return, and dry_run control. Front-loaded and no redundant information. Every sentence earns its place.

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 7 parameters, no output schema, and no annotations, the description provides a solid overview of purpose, methodology, return, and dry_run behavior. It does not detail every parameter or return format, but it is sufficient for a high-level understanding.

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 coverage is 0%, so the description must compensate. It indirectly explains the required parameters (source, line_start, line_end, new_name) through context, but does not describe return_type or target_file. The description adds meaning for the core parameters but leaves gaps for optional ones.

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 states the tool's purpose: 'Extract a contiguous block of lines into a new helper function.' It uses a specific verb (extract) and resource (contiguous block of lines, new helper function), and distinguishes well from siblings like extract_inputs or extract_doc which focus on different extraction tasks.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives (e.g., extract_inputs, extract_doc, or manual refactoring). The description implies its use for code extraction but does not state prerequisites, limitations, or preferred scenarios.

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/ptacr/mcp-mt5'

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