Skip to content
Download

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.

Terminal window
msgraph openapi-search [flags]

At least one of --query, --resource, or --method is required.

Terminal window
msgraph openapi-search --query "send mail"

Searches path, summary, and description fields.

Terminal window
msgraph openapi-search --resource users
msgraph openapi-search --resource messages
msgraph openapi-search --resource groups
Terminal window
msgraph openapi-search --resource users --method POST
Terminal window
msgraph openapi-search --query "calendar" --method GET --limit 5
{
"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"
}
]
}

The index is pre-generated from the official Microsoft Graph OpenAPI metadata using the included indexer tool:

Terminal window
go run ./tools/openapi-indexer -version beta -output skills/msgraph/references/graph-api-index.json

The 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
FlagDescriptionDefault
--queryFree-text search
--resourceFilter by resource name
--methodFilter by HTTP method
--limitMax results20