Tools reference

The tools exposed by @ontosdk/mcp. Inputs, outputs, and example calls.

Same engine as the Read API. Each tool is a thin wrapper over the corresponding REST endpoint — same scoring model, same cache, same quota.

read_url

Fetch any public URL and return clean Markdown plus extraction stats. Typically returns 10× less payload than raw HTML.

Input

urlstringrequiredThe public http:// or https:// URL to fetch.
freshbooleanoptionalIf true, bypass the 1-hour cache. Default: false.

Output (excerpt)

json
"status": "success",
"url": "https://stripe.com/pricing",
"markdown": "# Stripe pricing\\n\\nIntegrated per-transaction pricing…",
"metadata": { ... },
"stats": { reduction_pct: 90.7, cached: false }

Example agent call

bash
# In any MCP-capable chat client:
> Use Onto to read https://stripe.com/pricing and summarize each plan.

# The agent invokes: read_url({ url: 'https://stripe.com/pricing' })

score_url

Return the AIO (AI-readability) score for a URL — 0–100, letter grade, hallucination risk, and a structured list of what helps and what hurts AI consumption.

Input

urlstringrequiredURL to score.

Output (excerpt)

json
"score": 62, "grade": "C",
"hallucination_risk": "medium",
"penalties": [ ... ], "benefits": [ ... ],
"recommendations": [ ... ]

Full scoring model: Concepts → AIO Score.

read_and_score

Both of the above in one call. Recommended default for agentic workflows — the model gets the content and the trust signal in a single round trip.

Input

urlstringrequiredURL to read and score.
freshbooleanoptionalIf true, bypass the cache. Default: false.

Output

Union of the read_url and score_url payloads under a single top-level object. See POST /v1/read-and-score for the full schema.

batch

Process many URLs in one call — so the agent doesn't spend a credit per URL. Pass an explicit urls list or a site base URL (pages auto-discovered via sitemap), and a mode.

Input

urlsstring[]optionalExplicit list of URLs (max 50). Use this OR "site".
sitestringoptionalBase URL whose pages are auto-discovered. Use this OR "urls".
mode'read' | 'read-and-score' | 'extract'optionalWhat to do per URL. Default 'read-and-score'.
limitnumberoptionalSite mode only: max pages to discover (default 25, max 50).

Example agent call

bash
# In any MCP-capable chat client:
> Use Onto to pull every page of https://stripe.com and extract their structured data.

# The agent invokes: batch({ site: 'https://stripe.com', mode: 'extract' })

map_site

Discover a site's URLs (sitemap → links) without reading them. Cheap — use it to plan which pages to read or batch next.

Input

urlstringrequiredBase URL of the site to map.
limitnumberoptionalMax URLs to return (default 100, max 1000).

extract_data

Return the structured data a page already declares — JSON-LD, OpenGraph, meta — plus the AIO score. Deterministic, no AI: only data present in the page.

Input

urlstringrequiredURL to extract structured data from.
freshbooleanoptionalIf true, bypass the 1-hour cache and re-fetch. Default: false.

Backed by the Read API

Every tool maps 1:1 to a Read API endpoint. If you need to drive these from a backend instead of an MCP client, hit the HTTP layer directly: