@jy02414216/pi-tools-info
A read-only Pi command for inspecting registered tools, exposure, active status, and sources.
Package details
Install @jy02414216/pi-tools-info from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@jy02414216/pi-tools-info- Package
@jy02414216/pi-tools-info- Version
0.1.2- Published
- Oct 1, 2026
- Downloads
- 460/mo · 460/wk
- Author
- jy02414216
- License
- MIT
- Types
- extension
- Size
- 28 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-tools-info
English | 简体中文
A tool inspector extension for Pi. Use /tools-info to inspect the exposure, active status, source, and full description of tools registered in the current session.
Installation
pi install npm:@jy02414216/pi-tools-info
Try it temporarily without changing Pi settings:
pi -e npm:@jy02414216/pi-tools-info
Uninstall:
pi remove npm:@jy02414216/pi-tools-info
Local development
Load it temporarily from the repository root without changing Pi settings:
pi -e ./packages/pi-tools-info
After editing the loaded extension, run /reload in Pi. Developed against Pi 0.99.1; development tests use Node.js 24 or later:
npm test --workspace @jy02414216/pi-tools-info
Features
- Lists registered tools by name, including inactive and hidden tools.
- Combines keyword, active-status, and exposure filters, with command argument completion.
- Opens tool details with full descriptions, source metadata, namespaces, and behavioral hints.
- Read-only: does not execute tools, change tool state, or send messages to the model.
Inspecting tools
Enter this in Pi:
/tools-info
UI hints are in English. Interactive TUI mode is required. The list and details appear in a temporary overlay at the bottom of the terminal. Closing it restores the original interface; the panel does not enter the session transcript or model context.
Example list (illustrative data):
Tools · Registered: 3 · Active: 2
Tool Exposure Active Source
> ask_user model-only Yes npm:@example/pi-ask…
mcp__github__search_code deferred No builtin:mcp
read direct Yes builtin:read
Esc/q Close · Enter Details · ↑↓/jk Select · PgUp/PgDn Page · 1-3/3
Tools are sorted by name, using case-sensitive rather than natural numeric ordering. Long names and sources are truncated with …; the details view shows the full content. Narrow windows hide the source column, and very small windows show a resize prompt.
Default keys:
| Key | List | Details |
|---|---|---|
↑ / k, ↓ / j |
Select a tool | Scroll content |
PageUp / PageDown |
Move by one page | Scroll by one page |
Enter |
Open details | — |
Esc / q |
Close the panel | Return to the list, preserving selection and position |
Ctrl+C |
Close the panel | Close the panel |
Navigation, confirmation, and cancellation follow Pi's tui.select.* keybindings. q always returns or closes, and Esc always returns to the list from details.
Search and filters
/tools-info [keywords...] [--active | --inactive] [--exposure <value>]
Common examples:
/tools-info github search
/tools-info --active
/tools-info --exposure deferred
/tools-info github --inactive --exposure direct
- Keywords: Split on whitespace and matched as case-insensitive substrings against full tool names, tool descriptions, namespace names, source names, and paths. Multiple keywords are ANDed and may match different fields. Parameter schemas and annotations are not searched. Regex, fuzzy matching, quoted phrases, and escaping are not supported.
- Active status:
--activeshows only active tools;--inactiveshows only inactive tools. The flags are mutually exclusive. Omitting them leaves status unrestricted. - Exposure:
--exposure <value>matches exactly one ofdirect,model-only,codemode,deferred, orhidden. Values must be lowercase. Omitting it leaves exposure unrestricted.
All three conditions are combined with AND, and options and keywords can appear in any order. The exposure value must immediately follow --exposure, separated by whitespace; --exposure=direct is not supported. Repeating the same option value does not change the result. Unknown options, missing values, invalid values, and conflicting values produce an error with usage information.
Use Tab to complete options and exposure values. For example, --ex completes to --exposure ; typing d then offers direct and deferred. Completion preserves existing keywords and arguments, and hides already selected or conflicting options based on the text before the cursor. Tool names and search keywords are not completed.
Tool details
Select a tool and press Enter to see its full name, exposure, active status, and description, plus:
- Source fields:
source,path,scope,origin, andbaseDir. - Namespace name and description.
- Four behavioral hints:
readOnlyHint,destructiveHint,idempotentHint, andopenWorldHint.
Descriptions are displayed as plain text with line breaks preserved; instructions within them are not executed. Behavioral hints retain their original values. Missing hints show Not declared, not false. These hints are unverified and are not a safety guarantee.
Understanding the results
- Registered: The total number of currently registered tools. Unregistered tools are not listed, for example when an MCP server has not connected successfully. Use
/mcpto inspect server status. - Active: The number of tools in the current active set, not the number of callable tools. Other extensions may also adjust the final tool declarations sent to the model.
- Shown: The number of matches, displayed when searching or filtering.
RegisteredandActivealways refer to the entire snapshot and are unaffected by filters.
| Exposure | Meaning |
|---|---|
direct |
Declared to the model and callable by other tools while active |
model-only |
Declared to the model while active, but never callable by other tools |
codemode |
Callable by other tools once registered; can also be explicitly activated |
deferred |
Callable by other tools once registered, but omitted from the regular codemode listing; can be searched for and activated |
hidden |
Registered but not callable |
Inactive does not mean uncallable: codemode and deferred tools can be called by other tools without being active. The panel shows runtime exposure; the MCP configuration value codemode-deferred maps to deferred.
The panel shows No matching tools. when nothing matches, or No tools registered. when the registry is empty. Unknown exposure values are preserved rather than guessed to be direct.
Performance and privacy
- Reads
pi.getAllTools()andpi.getActiveTools()only when opening the panel. The list and details use the same snapshot and do not refresh automatically while open. - Does not read the tool registry during extension loading or argument completion, and starts no timers or background tasks.
- Does not execute tools, change configuration or active state, initiate MCP connections, write to the session, or send model requests.
- Displays tool metadata as plain text with terminal control sequences removed. Source paths may contain local usernames, so review screenshots before sharing them.