Skip to main content
Glama

Repair a library

repair_library
Destructive

Remove orphaned 3D-model data from PcbLib files by deleting unreferenced embedded models and fixing body references to missing STEP models, resolving library validation errors.

Instructions

Repair a PcbLib by removing orphaned 3D-model data: (1) embedded models not referenced by any footprint, and (2) component body references that point to non-existent models. This fixes libraries where STEP model data is missing but references remain (validate_library reports both conditions). PcbLib only; a SchLib is refused.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoIf true, report what would be fixed without making changes (default: false)
filepathYesPath to the library file (.PcbLib)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses the destructive nature by stating it removes data, and mentions the refusal of SchLib files, which are behaviors beyond the annotations that already mark it destructive. It does not detail all side effects (e.g., whether changes are saved automatically), but the annotation covers the core destructiveness.

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?

The description is concise, using two sentences with a clear enumerated list of the two repair operations. It avoids unnecessary detail and is well-structured for quick comprehension.

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?

It provides sufficient context about the problem it solves (missing STEP references) and the trigger condition (validate_library reports both conditions), along with the scope restriction. While it does not mention the effect of dry_run (covered by the parameter description), the overall context is adequate for an agent to decide to invoke the tool.

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?

The schema provides full descriptions for both parameters (filepath and dry_run). The tool description adds context about the file type (PcbLib only) but does not significantly enhance the semantic understanding of the parameters beyond what the schema already provides.

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 repairs PcbLib files by removing orphaned 3D-model data, enumerating two specific types (embedded models not referenced and body references to non-existent models). It distinguishes this tool from other library operations by focusing on the repair action.

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?

It implies usage after validate_library reports the orphaned data conditions, and it explicitly states the scope (PcbLib only, SchLib refused), which helps an agent decide when to use this tool. However, it does not name alternative tools for comparison.

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

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/embedded-society/altium-designer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server