Skip to main content
Glama

lib_extract_cse_zip

Extracts a Component Search Engine zip, stages its SchLib, PcbLib, and STEP files in a destination folder, and returns an ordered install plan for placing the part.

Instructions

Extract a Component Search Engine zip and build its install plan.

Stage 5 of the autonomous flow (library readiness, reference/autonomy-roadmap.md): stages the recognized members (.SchLib / .PcbLib / STEP) flattened into dest_dir and returns an ordered install_plan whose steps are exact lib_install_library / lib_link_footprint / lib_link_3d_model parameter dicts -- dispatch them in order to make the part placeable. Any archive member with an absolute path, drive letter, or .. segment rejects the WHOLE archive before anything is written. Extraction is pure Python; only the install plan touches Altium when dispatched.

Args: zip_path: Absolute path to the downloaded zip. dest_dir: Where to stage the files. Default: <workspace>/cse_imports/<zip stem>.

Returns: {"ok": True, "mpn", "files": [abs paths], "extracted": {"schlib"/"pcblib"/"step": abs path or None}, "install_plan": [{"tool", "params"}]} or {"ok": False, "reason": "..."}.

Input Schema

NameRequiredDescriptionDefault
dest_dirNo
zip_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries full burden and does so well: it discloses the security gate (absolute paths, drive letters, or '..' segments reject the WHOLE archive before anything is written), that extraction is pure Python, and that only dispatch of the plan touches Altium. This is exactly the behavioral context an agent needs for a file-writing tool.

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 a one-line summary before flow/staging/returns details, with clean Args/Returns sections. Slightly verbose with the roadmap reference, but the length is largely earned given the tool's complexity.

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?

Given a 2-param tool with an output schema, no annotations, and a mutation-like extraction step, the description covers inputs, staging target, security failure mode, return shape, and downstream dispatch. Nothing an agent needs to call it correctly is missing.

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 coverage is 0%, so the description must compensate, and it does: zip_path is described as an absolute path to the downloaded zip, and dest_dir gets a concrete default template. Minor room remains — no note on creating dest_dir or overwriting behavior.

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+resource phrase ('Extract a Component Search Engine zip and build its install plan') and names the exact downstream tools (lib_install_library / lib_link_footprint / lib_link_3d_model), distinguishing it from the sibling lib_inspect_cse_zip.

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?

Positions the tool explicitly as 'Stage 5 of the autonomous flow' and tells the agent to dispatch the returned plan steps in order to make the part placeable. It gives clear context but does not explicitly state when NOT to use it (e.g., versus lib_inspect_cse_zip first), so it falls short of a full 5.

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