Skip to main content
Glama

add_parameter

Add parameters to function signatures in code files without modifying function bodies. Use this tool to insert parameters at the start or end of signatures.

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
Behavior4/5

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

With no annotations provided, the description carries full burden and does well: it discloses the tool modifies code (implied mutation), specifies it only affects signatures not bodies, and mentions default position behavior. It doesn't cover error conditions or permissions, but provides solid behavioral context for a code modification 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?

Perfectly structured: purpose statement first, behavioral constraint second, usage guidelines third, example fourth. Every sentence adds value with zero redundancy. The example efficiently illustrates parameter usage without being verbose.

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?

For a code modification tool with 4 parameters, 0% schema coverage, no annotations, but with output schema present, the description is complete: covers purpose, usage, behavior, and parameter semantics. The output schema handles return values, so description appropriately focuses on tool selection and input understanding.

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 description coverage is 0%, so description must compensate. It provides meaning for 'target' (function name like 'LRUCache.get'), 'parameter' (string like 'default=None'), and 'position' (values 'end' or 'start' with default). Only 'file_path' lacks semantic explanation, but 3/4 parameters are well-clarified beyond schema titles.

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 specific action ('Add a parameter'), target ('to a function signature'), and scope ('at position end or start, leaves body untouched'). It distinguishes from siblings like 'replace_signature' and 'replace_function' by specifying its limited scope.

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?

Explicitly provides 'Use this when' guidance (adding 1-2 parameters without retyping signature) and 'Don't use this when' alternatives (use 'replace_signature' for entire signature, 'replace_function' for body changes). This clearly defines when to choose this tool over siblings.

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/agent-skills'

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