OpenAPI Search
The openapi-search command searches a pre-processed index of the Microsoft Graph OpenAPI specification. This helps agents (and humans) find the right endpoint when they’re unsure of the URL.
msgraph openapi-search [flags]At least one of --query, --resource, or --method is required.
Search by Keyword
Section titled “Search by Keyword”msgraph openapi-search --query "send mail"Searches path, summary, and description fields.
Search by Resource
Section titled “Search by Resource”msgraph openapi-search --resource usersmsgraph openapi-search --resource messagesmsgraph openapi-search --resource groupsSearch by Method
Section titled “Search by Method”msgraph openapi-search --resource users --method POSTCombined Search
Section titled “Combined Search”msgraph openapi-search --query "calendar" --method GET --limit 5Response Format
Section titled “Response Format”{ "count": 3, "results": [ { "path": "/me/sendMail", "method": "POST", "summary": "Send mail", "description": "Send the message specified in the request body...", "scopes": ["Mail.Send"], "resource": "me", "matchReason": "summary match" } ]}How the Index is Built
Section titled “How the Index is Built”The index is pre-generated from the official Microsoft Graph OpenAPI metadata using the included indexer tool:
go run ./tools/openapi-indexer -version beta -output skills/msgraph/references/graph-api-index.jsonThe indexer produces a SQLite FTS5 database (graph-api-index.db) alongside the JSON file. The CLI uses the database for full-text search with BM25 ranking and Porter stemming.
The index contains ~27,000 endpoints from the beta API, each with:
- Path
- HTTP method
- Summary and description
- Required permission scopes
- Resource category
- Operation ID, parameters, doc URL, and request/response schema refs
| Flag | Description | Default |
|---|---|---|
--query | Free-text search | — |
--resource | Filter by resource name | — |
--method | Filter by HTTP method | — |
--limit | Max results | 20 |