Skip to main content
Glama

add_import_name

Add a name to an existing Python 'from X import' statement. Use this tool to extend import lines without creating duplicates when the module is already imported.

Instructions

Add a name to an existing Python from <module> import a, b statement. Python-only. Skips duplicates.

Use this when: The module is already imported via from X import ... and you want to add another name to that existing line. Don't use this when: The import statement doesn't exist yet -> use add_import.

Example: module="typing" name="Optional"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
moduleYes
nameYes

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 disclosing key behavioral traits: it's Python-specific, skips duplicates, and operates on existing import statements. However, it doesn't mention potential side effects like file modification confirmation or error handling for invalid inputs.

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 front-loaded with the core purpose first, followed by usage guidelines and a concrete example. Every sentence earns its place with zero wasted words. The structure moves naturally from what it does to when to use it to how it works.

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?

For a mutation tool with no annotations, 0% schema coverage, but with an output schema present, the description does well by covering purpose, usage, and key behaviors. The output schema likely handles return values, so the description appropriately focuses on when and how to use the tool rather than return details.

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 description must compensate. It provides an example showing 'module' and 'name' parameters in action, but doesn't explain 'file_path' at all. The description adds some meaning for 2 of 3 parameters, but leaves one completely undocumented.

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 name'), the resource ('existing Python `from <module> import a, b` statement'), and scope ('Python-only. Skips duplicates'). It explicitly distinguishes from sibling 'add_import' by specifying this is for adding to an existing import line, not creating a new one.

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?

The description provides explicit 'Use this when' and 'Don't use this when' guidance with clear alternatives named ('add_import'). It gives concrete context about when to choose this tool versus its sibling, including a specific example scenario.

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