Skip to main content
Glama

index_library_source

Indexes third-party library source code at a specific version from pip, npm, Go, or Cargo so API lookups match the implementation used.

Instructions

Indexes a third-party library's source code for API lookup. Fetches the actual implementation at a specific version from pip, npm, go, or cargo. Format: pip/django@4.2, npm/react@18, go/github.com/gin-gonic/gin, cargo/serde.

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": {
      "package": "<package>"
    },
    "name": "index_library_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
packageYesPackage spec: manager/name[@version] (e.g., pip/django@4.2, npm/react)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.2

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose meaningful behavior: it performs a network fetch of real source at a specific version, and version pinning is part of the spec. It does not state idempotency, cost/latency, failure behavior for unknown packages, or whether results are cached.

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?

Three short sentences, front-loaded with the core action, then the fetch semantics, then the input format. Only minor redundancy between the format sentence and the schema's own example.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter tool with full schema coverage this covers the essentials, but it leaves open whether indexing is required before library lookups work, how re-indexing behaves, and what happens on an unsupported manager — gaps that matter for an unannotated, network-touching tool.

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 100%, so the baseline is 3, but the description earns a bump by enumerating the four supported managers (pip, npm, go, cargo) and showing that the version suffix is optional, details the schema examples only partially convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb and resource: 'Indexes a third-party library's source code for API lookup', plus a clarifying sentence that it fetches the real implementation at a pinned version. This clearly separates it from repo/project indexing siblings by scope ('third-party library' vs. your own code), though it does not name any sibling explicitly.

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

Usage Guidelines3/5

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

'for API lookup' implies the use case, and the manager list implies the accepted inputs, but there is no explicit when-to-use/when-not guidance, no mention of checking indexed_libraries first, and no note about re-indexing or removal via siblings.

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