sn_read_docs
Retrieve ServiceNow official documentation from GitHub markdown. Explore release indexes, search topics by keyword, or fetch specific doc files with automatic version resolution.
Instructions
Access the official ServiceNow AI Platform documentation from https://github.com/ServiceNow/ServiceNowDocs — pure markdown, optimised for LLM use.
IMPORTANT: Never fetch servicenow.com/docs — it is a JS SPA with no readable content.
Three execution modes: get_index — Fetch llms.txt (full release index) so you can study the layout and navigate on your own. Pass 'publication' to drill into one area's TOC. search — Pass a keyword to find relevant topics across all publications and supplement the results with GitHub code search in the ServiceNowDocs repo. Returns file_url and file_path values ready for get_file. get_file — Directly read any doc file when you know the path or URL (after reading an index or following a relative markdown link).
Version resolution (fully dynamic — zero hard-coded branch names): • Pass 'version' with a release name (e.g. 'Xanadu', 'Zurich', 'Australia'). • Default branch is fetched live from GitHub API — always correct, zero maintenance. • Valid branches come from llms_template.txt in the repo — the authoritative list. • Matching is case-insensitive and fuzzy against that live list. • Unknown/mistyped versions fall back to the default branch with a clear notice.
Recommended workflow:
mode='get_index' → understand what's available
mode='get_index', publication='api-reference' → browse a specific area
mode='get_file', file_url='<url from step 2>' → read the doc OR: mode='search', search='GlideRecord' → find topics by keyword
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Execution mode. Default: 'get_index'. 'get_index' to explore, 'search' to find, 'get_file' when path is already known. | |
| search | No | For mode='search': keyword to find across all topic headings (e.g. 'GlideRecord', 'REST API', 'flow designer', 'catalog item'). | |
| version | No | ServiceNow release to target (e.g. 'Australia', 'Zurich', 'Yokohama', 'Xanadu'). Resolved dynamically from the live GitHub repo — no hard-coded values. Omit to use the repo's current default branch. Invalid/unknown versions fall back to the default branch with a notice. | |
| file_url | No | For mode='get_file': full raw.githubusercontent.com URL. Copy directly from get_index output. Takes priority over file_path. | |
| file_path | No | For mode='get_file': repo-relative path (e.g. 'markdown/api-reference/scripts/GlideRecord.md'). | |
| max_results | No | For mode='search': max topic results to return (default 30). | |
| publication | No | For mode='get_index': publication folder to get TOC for (e.g. 'api-reference', 'it-service-management', 'platform-administration'). Omit to get the top-level llms.txt for the whole release. |