Skip to main content
Glama

insert_sibling

Insert content precisely before or after a named top-level symbol such as a function, class, or method, enabling exact placement relative to siblings.

Instructions

Insert content as a sibling of a named symbol (function, class, method, or top-level assignment). Pass position="before" or position="after".

Use this when: You need precise placement relative to another top-level symbol -- e.g. a helper function immediately before its caller, a constant immediately above the class that uses it. Don't use this when: You just want to append to the end of the file -> use add_top_level. You're inserting inside a function body -> use insert_in_body (with at, after, or before).

Example: target="LRUCache" content="CACHE_SIZE = 100" position="before"

target="LRUCache"
content="RELATED_CONSTANT = 42"
position="after"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
targetYes
contentYes
positionYes

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 carries full burden. It explains insertion behavior (sibling vs inside), the role of position parameter, and provides usage examples. It does not mention error handling or side effects but is transparent enough for typical use.

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?

The description is somewhat verbose but well-structured with bullet points and examples. It front-loads the core action and follows with when-to-use guidance, making it easy to scan. Minor redundancy (e.g., repeating position examples) kept at bay.

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 4 required parameters, no annotations, and an output schema present, the description covers all necessary aspects: purpose, parameter roles, usage guidelines, and examples. It is sufficient for an agent to invoke correctly without additional context.

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

Parameters5/5

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

Schema coverage is 0%, so description compensates fully. It explains the purpose of target, content, and position parameters, and includes concrete examples showing their values. file_path is implicit but clear from context.

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 inserts content as a sibling of a named symbol, specifying position options. It distinguishes from sibling tools like add_top_level (append to file end) and insert_in_body (inside function body), making purpose unambiguous.

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 when to use (precise placement relative to a symbol) and when not to use, with clear alternatives (add_top_level for end-of-file, insert_in_body for function bodies). Examples further clarify correct usage.

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