Inspect Command
Inspect servers or tools from a running 1MCP serve instance.
Reuse known tool schemas within the session, including across projects, when the tool contract is unchanged. Keep project-specific instructions, readiness, authorization, and target selection current. Refresh server and tool inspection when information is missing, capabilities change, preparation completes, or relevant failures occur. Never automatically replay failed tool calls.
Synopsis
1mcp inspect [target] [options]Description
The inspect command is the discovery and schema step in the CLI workflow. Use it before run when server or tool information is missing or needs refreshing.
Depending on the target, inspect can:
- List all exposed servers when no target is provided
- List the exposed tools for a server when the target is
<server> - Show a readable tool schema summary when the target is
<server>/<tool>
When supported, inspect uses the authenticated /api/v1/inspect endpoint first and falls back to the MCP protocol when needed. It reports startup states for configured static servers before the first capability snapshot; use wait when a script must wait for connected with available: true.
This is the command that turns the broad inventory from instructions into a scoped view. Inspect the server and tool only when their inventory, applicable instructions, capabilities, or schema is missing or needs refreshing. Otherwise, use the known schema while keeping project-specific context current.
Bare 1mcp inspect returns the current server inventory without starting template backends, refreshing capabilities, or requesting tool lists. Counts come only from current, complete metadata for the visible connections. Text and TOON show unknown when a count is unavailable; JSON keeps a numeric toolCount and adds toolCountKnown: false. An unknown count is not evidence of zero tools. Use inspect <server> when you need its current tool inventory. Timeouts and connection failures are reported separately from an unsupported inspect endpoint.
Targets
- Omit target - List all servers exposed by the running 1MCP instance
<server>- List tools for one server; initialize only that template when needed<server>/<tool>- Inspect a single tool schema
Read a server manual with 1mcp instructions <server>. Ordinary inspect output does not include instruction blocks.
Options
Project selection and ownership
--project <path-or-label>— Select a checkout or a project-set member.--project-set <file>— Load a saved project set.--project-owner <file>— Override automatic owner lookup with this caller’s own bootstrap credential when required.
See Project and owner options for shared rules. Supported Codex sessions use their verified owner and assigned project automatically. Claude and hosts without automatic owner lookup must supply their own bootstrap --project-owner <own-file>. Keep explicit target overrides consistent across related calls.
Connection and Filtering
--url, -u <url>- Override auto-detected 1MCP server URL--context <name>- Use a named Runtime Target Context and its saved bearer token, if any--preset, -p <name>- Use a preset when querying the running server--tag-filter, -f <expression>- Apply an advanced tag filter expression--tags <tag>- Apply simple comma-separated tags
Output and Pagination
--format <toon|text|json>- Output format--all- Fetch all remaining tools for a server target or search--limit <number>- Page size for server tool listings and search results (default:20)--cursor <cursor>- Cursor returned from a previous paginated response
Related Global Options
--config-dir, -d <path>- Config directory for auth profile lookup and server discovery--cli-session-cache-path <path>- Override the session cache path template used byinspectandrun; supports{pid}and{scope}
Search for Tools
When the provider or tool is unknown, search the visible inventory before exact inspection:
1mcp inspect --search read
1mcp inspect filesystem --search read
1mcp inspect --search 'filesystem/*read?' --glob
1mcp inspect --search 'read a file' --include-descriptions
1mcp inspect --search read --show-descriptions --format json
# Read the selected server's applicable instructions, then inspect and invoke.
1mcp instructions filesystem
1mcp inspect filesystem/read_file
1mcp run filesystem/read_file --args '{"path":"README.md"}'When inspection is needed and the target is already known, inspect it directly. Reuse current startup instructions supplied by hooks; search does not replace applicable server instructions or exact schema inspection.
--search <query>searches all visible servers, or only the specified server. Matching is case-insensitive literal substring matching againstserver/toolreferences.--globopts into whole-reference matching with only*(zero or more characters) and?(one character) as wildcards. Quote patterns to avoid shell expansion; all other punctuation remains literal.--include-descriptionsalso matches effective descriptions, including configured overrides, using the selected matching mode. Each tool appears once even when both fields match.--show-descriptionsindependently includes descriptions in output; it does not change matching. Description matching alone keeps output compact.
Blank queries, exact-tool targets with search, and search-only flags without --search are invalid. Search preserves authentication, preset/tag filters, contextual template visibility, and disabled-tool rules.
Search returns server, tool, and required/optional argument counts without schemas. TOON is the default; text and JSON are also supported. Results are sorted by public server/tool identity and paginated after matching. --limit defaults to 20, and --all returns all remaining matches after an optional cursor. totalTools counts matches in the collected inventory, not all tools. Cursors bind the query, matching options, target, filters, and inventory; restart without a cursor if any change invalidates continuation.
A complete search with no matches succeeds. Check completeness and loading/unavailable metadata before concluding that a tool is absent. Partial inventories are not definitive absence; failed or malformed enumeration is reported. Use 1mcp wait <server> for a loading static server. Cross-server search requires a runtime supporting inspect search; upgrade/restart an older runtime when directed. Server-scoped search may use the existing MCP fallback. Authentication failures remain terminal and do not trigger fallback.
Examples
List All Servers
1mcp inspectList a Server's Tools
1mcp inspect filesystemInspect a Tool Schema
1mcp inspect filesystem/read_fileUse JSON Output for Scripting
1mcp inspect filesystem --format jsonInspect Through a Runtime Target Context
1mcp inspect --context prod filesystem/read_fileFetch Every Tool for a Server
1mcp inspect filesystem --allContinue a Paginated Listing
1mcp inspect filesystem --limit 20 --cursor next-page-tokenWhen to Use Inspect
Use inspect when you need to:
- Confirm which servers are currently available
- Discover a tool’s server/tool command reference
- Review a tool's input and output schema before calling it
- Build scriptable automation using JSON output
- Keep the agent focused on one part of the tool surface at a time
See Also
- CLI Mode Guide - Why progressive server and tool inspection is recommended
- Instructions Command - Start with the current CLI playbook and server inventory
- Run Command - Call a tool after you have inspected its schema
- Serve Command - Start the 1MCP server that
inspectqueries - Configuration Deep Dive - Global flags including CLI session cache configuration
Tool output and pagination
CLI output identifies tools with server and tool; redundant qualifiedName / qualified_name display fields are omitted in text, JSON and TOON. API routing identities are unchanged.
--limit bounds the visible page even if the upstream server ignores pagination limits. totalTools is the complete currently visible inventory size; hasMore and nextCursor describe the remaining tools. Each inspection request collects upstream pages with a bounded walk (up to 1,000 pages) before applying local pagination. --all returns all remaining tools (all tools when no cursor is supplied). Cursors are tied to the target, filters and inventory. If a cursor is invalid or stale, restart without --cursor.
