pkg_find
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
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Optional: class, interface, enum, struct, delegate or method (a PyPI or npm function is a method; an npm type alias is a struct) | |
| guide | No | true: put the packages guide first in the result. Use on your first packages call, or when told it changed. | |
| limit | No | Optional: results to return (default 10, max 25) | |
| query | No | What you are looking for: a name, camel-case or snake_case words, or a description. Empty browses. | |
| project | No | Optional, 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. | |
| version | No | Optional: exact package version, from the project's package list or lock file. Omit for the latest stable. | |
| ecosystem | No | Optional: 'nuget' (default), 'pypi' (a Python package) or 'npm' (a JavaScript or TypeScript package). | |
| namespace | No | Optional: exact namespace to search in (the module for PyPI and npm: a dotted module, or a path inside the package) | |
| packageId | Yes | Package id (NuGet, e.g. 'Polly'), project name (PyPI, e.g. 'requests') or package name (npm, e.g. 'zod' or '@tanstack/react-query') | |
| workspace | No | Optional, 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). | |
| declaringType | No | Optional: exact type name; lists that type's methods (for PyPI and npm a module name lists its functions) | |
| targetFramework | No | Optional, NuGet only: target framework such as 'net10.0' (default: the configured default) | |
| includePrerelease | No | Optional: allow prerelease when no version is given (default false; NuGet only) | |
| additionalPackageIds | No | Optional, NuGet only: extra package ids whose assemblies the reflection needs, only after an error that names a missing assembly |