Skip to main content
Glama

remove_leading_comment

Deletes the comment block directly above a specified symbol in code files, stopping at blank lines or non-comment content. Use to remove outdated or incorrect documentation without affecting code structure.

Instructions

Remove the contiguous block of comment lines immediately above a named symbol. Stops at the first blank line or non-comment line.

Use this when: You want to delete an outdated or wrong comment above a symbol. Don't use this when: You want to update the comment text -> use replace_leading_comment.

Example: target="LRUCache.get"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
targetYes

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 by explaining the exact removal behavior ('Stops at the first blank line or non-comment line') and providing a concrete example. However, it doesn't mention error conditions, permissions needed, or what happens if no comment exists.

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 with purpose statement, behavioral detail, usage guidelines, and example - all in 4 sentences with zero waste. Each sentence adds distinct value and the information is front-loaded appropriately.

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 this is a mutation tool with no annotations, the description does well covering purpose, usage, and behavior. The existence of an output schema means return values don't need explanation. However, for a destructive operation, more safety context (like confirmation or error handling) would be beneficial.

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 description coverage, the description compensates by providing an example showing 'target' parameter usage ('LRUCache.get'), which helps clarify the format. However, it doesn't explain the 'file_path' parameter or provide additional semantic context beyond what the example implies.

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 ('Remove the contiguous block of comment lines') and target ('immediately above a named symbol'), distinguishing it from siblings like 'replace_leading_comment'. It precisely defines what the tool does with concrete operational details.

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 both 'Use this when' (delete outdated/wrong comment) and 'Don't use this when' (update comment text) scenarios, naming the specific alternative tool 'replace_leading_comment'. This gives clear decision criteria for when to choose this tool versus its sibling.

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