Skip to main content
Glama

append_to_body

Insert content at the bottom of a function body while preserving existing statements. Use for adding final lines like cleanup, telemetry, or logging after work is done.

Instructions

Insert content at the bottom of a function body, preserving existing statements.

Use this when: You're adding one or two lines at the END of a function (cleanup, telemetry, final return statements, logging after work is done). Don't use this when: You're replacing the whole body -> use replace_function_body. You're adding to the top -> use prepend_to_body.

Example: target="LRUCache.get" content=" # end"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
targetYes
contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: it preserves existing statements (non-destructive to existing code), inserts at the bottom (specific location), and is for adding one or two lines (scope limitation). However, it doesn't mention potential side effects like syntax validation or error handling, which could be relevant 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?

The description is front-loaded with the core purpose, followed by usage guidelines and a concrete example. Every sentence earns its place: the first defines the action, the second and third provide explicit when/when-not rules, and the example illustrates usage. No wasted words, and the structure is logical and efficient.

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 moderate complexity (code insertion with specific constraints), no annotations, and an output schema (which handles return values), the description is mostly complete. It covers purpose, usage, and behavioral context well. However, it lacks details on parameter formats and potential error conditions, which could be important for reliable tool invocation.

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 description coverage is 0%, so the schema provides no parameter details. The description adds some semantics: it implies 'target' is a function identifier (e.g., 'LRUCache.get') and 'content' is code to insert, as shown in the example. However, it doesn't explain 'file_path' or provide format details for any parameters, leaving gaps in documentation.

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 ('Insert content at the bottom of a function body') and resource ('function body'), distinguishing it from siblings like 'prepend_to_body' (top insertion) and 'replace_function_body' (full replacement). The verb 'insert' with the qualifier 'at the bottom' precisely defines the operation.

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?

Explicit guidance is provided with 'Use this when:' for adding lines at the END (e.g., cleanup, telemetry) and 'Don't use this when:' with named alternatives for replacing the whole body ('replace_function_body') or adding to the top ('prepend_to_body'). This clearly defines when to use this tool versus 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