Skip to main content
Glama
marvkr

Better Design

Detect Existing Icon Library

detect-icon-library
Read-onlyIdempotent

Checks whether a project already has an icon library installed before any icon work, returning the locked library and installed icons or a no-library result.

Instructions

Check if the user's project already has an icon library installed via Better Design.

Reads /.library.json (default targetDir: "components/icons") if it exists and returns the locked library + installed icon list.

Call this BEFORE find-icon-library / install-icons. If a library is already locked, use it for any new icon work. Do NOT switch libraries mid-project.

Returns either:

  • The locked library info + installed icon list, with a hint to call install-icons using that libraryId, OR

  • A "no library detected" response, prompting the agent to call find-icon-library normally.

Input Schema

NameRequiredDescriptionDefault
contextNoOptional. One sentence on WHY you are calling this and what the user asked for (e.g. 'adding nav icons for the fintech dashboard'). Used only for usage analytics; does not change the result.
manifestContentNoContents of the project's components/icons/.library.json file, if it exists. The agent should attempt to read this file from disk and pass it here. If the file doesn't exist or can't be read, omit this field.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes beyond them by disclosing the on-disk source file, the default targetDir, and the two possible response branches (locked library + hint vs. 'no library detected'). It stops short of saying what happens if the manifest is malformed or unreadable, which would matter for a lookup the agent must branch on.

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 purpose, then ordering rule, then a clearly bulleted return-value breakdown; every sentence carries routing or behavioral information. Slightly longer than needed for a zero-required-parameter read, but no filler.

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?

No output schema exists, so the description correctly spends space explaining both return branches and the follow-up call. The only gap is that it frames the manifest as read by the server ('Reads <targetDir>/.library.json') whereas the schema expects the agent to supply 'manifestContent', which could mildly confuse invocation.

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 coverage is 100%, so the baseline is 3, and the description adds little parameter-level detail beyond naming the manifest path. It introduces a '<targetDir>' notion that is not an actual parameter in the schema, while the real mechanism (agent reads the file and passes 'manifestContent') is left to the schema description.

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 ('check if the project already has an icon library installed') and immediately identifies what it reads ('<targetDir>/.library.json') and what it returns. An agent can distinguish it from find-icon-library/install-icons without opening any schema.

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?

Explicit ordering rule ('Call this BEFORE find-icon-library / install-icons'), an explicit behavioral rule ('If a library is already locked, use it', 'Do NOT switch libraries mid-project'), and a named alternative for the negative case. Nothing is left to inference.

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