Skip to main content
Glama

Resolve Library

gt_resolve_library
Read-onlyIdempotent

Resolve ambiguous or unknown library names to GroundTruth IDs and retrieve documentation, llms.txt, and GitHub URLs from registries including npm, PyPI, crates.io, and Go.

Instructions

Find a library's GroundTruth ID ('vercel/next.js', 'npm:express') and its docs, llms.txt and GitHub URLs, from the registry, npm, PyPI, crates.io, Go and GitHub. Only for ambiguous or unknown names: other tools take plain names. 2-20 names: gt_batch_resolve. Registry is Elastic-2.0: look up named libraries only, never enumerate.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "libraryName": "<libraryName>"
    },
    "name": "gt_resolve_library"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoIntended use; ranks results
libraryNameYese.g. 'nextjs'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv8.1.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / libraryName / description
      Previous value: -"Library or framework name to look up. Examples: 'nextjs', 'react', 'tailwind', 'fastapi', 'drizzle'"New value: +"e.g. 'nextjs'"
    • changedInput schema / properties / query / description
      Previous value: -"Optional: what you want to do with this library, used to rank results"New value: +"Intended use; ranks results"
  2. First observedv5.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description still earns credit by disclosing a constraint the annotations cannot: the registry's Elastic-2.0 license permits named lookups but forbids enumeration. It stops short of saying what happens when a name is not found or how partial matches are returned.

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?

Three tightly packed sentences: deliverable and sources first, then the usage gate, then the sibling routing and license boundary. Every clause carries information and the front-loading lets an agent decide eligibility before reading the full text.

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?

For a two-parameter read tool with full annotation coverage, the description covers purpose, selection criteria, batching, and a legal constraint on enumeration. The only shortfall is inferred return behavior on lookup failure or multiple matches, which matters given there is no output schema.

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%, with both parameters described inline, including the intended-use ranking purpose of 'query'. The description adds no syntax, format, or disambiguation guidance beyond the schema, so the baseline 3 applies for a schema that does the heavy lifting.

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?

Specific verb plus resource: find a library's GroundTruth ID and its docs, llms.txt and GitHub URLs, with example outputs ('vercel/next.js', 'npm:express') and the sources searched. An agent can distinguish it from gt_get_docs or gt_search immediately because the deliverable (an ID) is named explicitly.

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?

States the trigger condition ('Only for ambiguous or unknown names: other tools take plain names') and routes a concrete volume band to a named sibling ('2-20 names: gt_batch_resolve'). It also adds a hard usage boundary: 'look up named libraries only, never enumerate.' Nothing is left to inference about when to pick this tool.

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