Skip to main content
Glama

lib_rename_component

Repair a schematic-library component whose LibReference contains unreproducible characters by assigning a clean new name via its component index, restoring name-based tool access.

Instructions

Rename one symbol's LibReference in a schematic library (.SchLib).

This is the repair path for a component whose current name carries bytes a caller cannot reproduce (an embedded double-quote, or a control char left by a broken import). Address it by component_index from lib_get_components, give it a clean new_name, and every name-based tool can reach it again.

The component is removed and re-added under the new name so the library's internal by-name index is rebuilt. Errors with NAME_EXISTS if a different component already uses new_name. Marks the library dirty for deferred save.

Args: new_name: the clean LibReference to write. component_name: current LibReference of the target. Provide this or component_index. library_path: optional absolute .SchLib path; defaults to the focused library. component_index: the integer index from lib_get_components, the name-free way to pick the target. Provide this or component_name.

Returns: {"success": true, "library_path": "...", "old_name": "...", "new_name": "..."}.

Input Schema

NameRequiredDescriptionDefault
new_nameYes
library_pathNo
component_nameNo
component_indexNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the component is removed and re-added so the by-name index is rebuilt, that NAME_EXISTS is raised on conflict, and that the library is marked dirty for deferred save. Only permissions/auth and concurrency behavior are unstated.

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?

Front-loaded with the one-line purpose, then rationale, mechanics, errors, and a structured Args/Returns block. The prose around the repair scenario is slightly long but every sentence adds usable context; nothing is filler.

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?

A destructive-ish mutation with no annotations and 0% schema coverage is fully covered: targeting, error mode, side effect, and even an explicit return shape despite an output schema existing. An agent has everything needed to invoke it correctly.

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%, yet all four parameters are documented in the Args block with meaning and defaults: new_name as the value to write, library_path defaulting to the focused library, and the mutually exclusive component_name vs component_index targeting with their source (lib_get_components). This fully compensates for the empty schema.

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?

States a specific verb and resource ('Rename one symbol's LibReference in a schematic library') and immediately distinguishes its role: it is the repair path for names with bytes a caller cannot reproduce. An agent can tell exactly what it does and why it exists relative to name-based siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains when to use it (component name carries embedded quote/control char) and how to target the component (component_index from lib_get_components). It does not mention the sibling lib_batch_rename, which could confuse an agent doing bulk renames, but the single-component scope is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools