Skip to main content
Glama

add_parameter

Add a parameter to a function signature at the end or start without modifying the function body. Use this to avoid retyping the entire signature for minor additions.

Instructions

Add a parameter to a function signature at position 'end' (default) or 'start'. Leaves the body untouched.

Use this when: You need to add one or two parameters without retyping the whole signature. Don't use this when: You need to replace the entire signature -> use replace_signature. You also want to change the body -> use replace_function.

Example: target="LRUCache.get" parameter="default=None" position="end"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
targetYes
parameterYes
positionNoend

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Without annotations, the description notes that the body is left untouched and provides a default position. However, it does not disclose error conditions, permissions, or other side effects.

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?

The description is concise with about five sentences, front-loads the main action, and includes a helpful example without unnecessary verbiage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity and the presence of an output schema, the description adequately covers usage, behavior, and examples, making it complete for effective tool selection.

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?

With 0% schema coverage, the description explains target, parameter, and position via example and default. It does not explain file_path, but covers 3 of 4 parameters meaningfully.

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 adds a parameter to a function signature at a specified position, distinguishing it from siblings like replace_signature and remove_parameter.

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 explicitly states when to use (adding one or two parameters) and when not to (replacing entire signature or changing body), and names alternative tools.

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/kambleakash0/ast-editor'

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