Skip to main content
Glama

add_import_name

Add a new imported name to an existing named import statement in Python or JavaScript/TypeScript, skipping if already present.

Instructions

Add a name to an existing named-import statement. Idempotent: skips if the name is already present.

  • Python (.py): from <module> import a, b

  • JS/TS: import { a, b } from "<module>"

Use this when: The module is already imported via a named-import form and you want to add another name to that existing statement. Don't use this when: The import statement doesn't exist yet -> use add_import. You want a default or namespace import (import Foo from ... or import * as ns from ...) -> use add_import with the full line.

Example (Python): module="typing" name="Optional" Example (TS): module="./utils" name="baz"

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?

Discloses idempotency and effect on code; no annotations provided, so description carries full burden. Could mention error handling, but sufficient 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with sections, examples, and bullet points; every sentence adds value without redundancy.

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?

Fully explains tool's purpose, usage, and behavior; output schema exists but description focuses on input and effect, which is appropriate for a simple mutation tool.

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 has zero descriptions; description adds meaning for all parameters with clear examples (module is import source, name is the symbol). Completes missing schema info.

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?

Clearly states 'Add a name to an existing named-import statement', specifies languages (Python, JS/TS) with examples, and distinguishes from siblings like add_import.

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 (existing named-import) and when not to use (use add_import for new imports or default/namespace imports), with alternatives named.

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