Skip to main content
Glama

pkg_find

Read-onlyIdempotent

Find types, classes, functions, or methods inside a package by name or described need, returning ranked symbol IDs and one-line cards.

Instructions

Finds types, classes, functions and methods inside one package, by name or by describing what you need ('chat completion', 'retry policy'). Each hit is a symbol id with a one-line card (a type: kind, full name, member counts and summary; a method: parameter types and return type), ranked by relevance and how prominent the symbol is in the package; the reply gives the total and the next call. An empty query lists the package's most prominent symbols. Nothing matched gives hints instead of an error. The first call for a package version downloads and indexes it (a few seconds); later calls are instant. Reads only. Narrow with kind, namespace (exact; the module for PyPI and npm) or declaringType (all methods of one type; for PyPI and npm a module name lists its functions). Pin the version the project uses: pass version, or for PyPI and npm pass workspace so the lock file decides. WHEN TO USE: the usual first call for a known package. Before it, pkg_search only when the package id is unknown, and pkg_outline only when the package is completely unfamiliar. Next: pkg_expand with up to 5 of the ids for exact signatures. For code in the workspace itself use code_search.

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": {
      "packageId": "<packageId>"
    },
    "name": "pkg_find"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoOptional: class, interface, enum, struct, delegate or method (a PyPI or npm function is a method; an npm type alias is a struct)
guideNotrue: put the packages guide first in the result. Use on your first packages call, or when told it changed.
limitNoOptional: results to return (default 10, max 25)
queryNoWhat you are looking for: a name, camel-case or snake_case words, or a description. Empty browses.
projectNoOptional, pypi and npm only: the project folder (or its pyproject.toml or package.json) inside the workspace whose lock file decides the version; default the workspace folder.
versionNoOptional: exact package version, from the project's package list or lock file. Omit for the latest stable.
ecosystemNoOptional: 'nuget' (default), 'pypi' (a Python package) or 'npm' (a JavaScript or TypeScript package).
namespaceNoOptional: exact namespace to search in (the module for PyPI and npm: a dotted module, or a path inside the package)
packageIdYesPackage id (NuGet, e.g. 'Polly'), project name (PyPI, e.g. 'requests') or package name (npm, e.g. 'zod' or '@tanstack/react-query')
workspaceNoOptional, pypi and npm only: workspace name. With it, and no version, the version comes from the project's lock file (uv.lock, poetry.lock, pdm.lock, pylock.toml; package-lock.json, pnpm-lock.yaml, yarn.lock).
declaringTypeNoOptional: exact type name; lists that type's methods (for PyPI and npm a module name lists its functions)
targetFrameworkNoOptional, NuGet only: target framework such as 'net10.0' (default: the configured default)
includePrereleaseNoOptional: allow prerelease when no version is given (default false; NuGet only)
additionalPackageIdsNoOptional, NuGet only: extra package ids whose assemblies the reflection needs, only after an error that names a missing assembly

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent and non-destructive, and the description goes well beyond them: it discloses the cold-start cost (first call downloads and indexes, a few seconds; later calls instant), the empty-query browse behavior, that a no-match returns hints rather than an error, and how results are ranked and shaped. These are exactly the operational traits an agent cannot infer from structured fields.

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 the core purpose, then result shape, then filtering, then usage routing — a logical order with no filler sentences. It is dense for a single description, and the kind/namespace/declaringType paragraph partially duplicates schema text, but nothing is meaningfully wasteful.

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?

For a 14-parameter tool with no output schema, the description still conveys return shape (symbol id plus one-line card, count, next call), ranking rationale, latency behavior and failure behavior. Combined with the fully documented schema and read-only annotations, an agent has everything needed to call it correctly.

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 adds relational meaning the schema does not: that version and workspace are alternatives where the lock file decides the version, and that declaringType/namespace act as exact filters whose meaning shifts for PyPI and npm. It does not explain limit/guide interaction, so it stops short of a 5.

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 with scope: finds types, classes, functions and methods inside one package, by name or by describing the need. It also distinguishes itself from pkg_search, pkg_outline, pkg_expand and code_search by name, so an agent can route without opening a 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?

The 'When to use' block explicitly positions the tool as the default first call for a known package, states the two preceding-tool exceptions (pkg_search for unknown ids, pkg_outline for unfamiliar packages), names the follow-up (pkg_expand with up to 5 ids), and redirects workspace code to code_search. Both when and when-not are covered.

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