{"at":"2026-11-23T01:06:22.017Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T01:06:22.634Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T01:06:22.734Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T01:06:23.302Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true},"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"@automatelab/citation-intelligence","version":"0.12.1"}}}}
{"at":"2026-11-23T01:06:23.302Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T01:06:23.302Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T01:06:23.308Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Check AI engine citations"},"description":"Return URLs cited by an AI engine (Perplexity, Claude, ChatGPT, Gemini, or Bing) for a query. Use this when an agent or user wants to see what sources an AI search engine grounds answers on. Requires at least one engine API key; auto-picks the first available.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"engine":{"default":"auto","description":"Engine to query.\n• perplexity / google_ai_mode — consumer_scrape: closest to real product behavior.\n• claude / openai / gemini — api_proxy: API-tier call, may differ from consumer product.\n• bing_serp / brave_serp — web_rank: traditional SERP rank, NOT LLM citation.\n'auto' prefers SerpAPI (google_ai_mode) → Perplexity → LLM adapters → web_rank.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","brave","google_ai_mode","auto"],"type":"string"},"max_results":{"default":10,"description":"Maximum citations to return.","maximum":50,"minimum":1,"type":"integer"},"perplexity_model":{"description":"Perplexity model override (e.g. 'sonar', 'sonar-pro', 'sonar-reasoning'). Only used when engine='perplexity'. Defaults to 'sonar-pro'.","type":"string"},"query":{"description":"The search query to test (what would a user ask an AI?)","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"citations_check","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"cached":{"description":"Whether the result was served from the local cache.","type":"boolean"},"citations":{"description":"Cited URLs ordered by rank.","items":{"additionalProperties":false,"properties":{"rank":{"description":"1-based citation rank.","type":"number"},"snippet":{"description":"Short excerpt the engine surfaced.","type":"string"},"title":{"description":"Page title as returned by the engine.","type":"string"},"url":{"description":"Cited URL.","type":"string"}},"required":["url","rank"],"type":"object"},"type":"array"},"engine":{"description":"Engine used for this response.","type":"string"},"fetched_at":{"description":"UTC ISO-8601 timestamp of the fetch.","type":"string"},"interpretation_note":{"description":"Guidance on how to interpret results from this engine.","type":"string"},"query":{"description":"The query that was executed.","type":"string"},"raw_answer":{"description":"Raw answer text from the engine, if available. Absent for web_rank engines (bing_serp, brave_serp) that return ranked URLs without a synthesized answer.","type":["string","null"]},"surface":{"description":"Engine surface type: consumer_scrape, api_proxy, or web_rank.","type":"string"}},"required":["query","engine","surface","interpretation_note","fetched_at","citations","cached"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Check domain citation presence"},"description":"Check whether a domain is cited by an AI engine across a cluster of queries. Returns per-query presence, rank, and a citation-rate summary. Use to measure visibility for a brand, product, or content site in AI search.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"domain":{"description":"Domain to check, e.g. 'automatelab.tech' (without protocol).","minLength":1,"type":"string"},"engine":{"default":"auto","description":"LLM engine to check for citations. 'auto' runs all available LLM engines and returns per-engine breakdown + cross-engine consensus. Pin to a specific engine to reduce cost. 'bing_serp' and 'brave_serp' measure web rank, not LLM citations — use check_citations for those.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","google_ai_mode","auto"],"type":"string"},"queries":{"description":"Queries to test the domain against. 1-20 queries per call.","items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"}},"required":["domain","queries"],"type":"object"},"name":"domain_am_i_cited","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"consensus":{"additionalProperties":{},"description":"Cross-engine consensus stats (multi_engine mode).","type":"object"},"domain":{"description":"The domain that was checked.","type":"string"},"engine":{"description":"Engine used (single_engine mode only).","type":"string"},"engines":{"description":"Per-engine summary rows (multi_engine mode).","items":{"additionalProperties":false,"properties":{"citation_rate":{"type":"number"},"engine":{"type":"string"},"ok":{"type":"boolean"},"queries_cited":{"type":"number"},"surface":{"type":"string"}},"required":["engine","ok"],"type":"object"},"type":"array"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"mode":{"description":"Whether one or multiple engines were queried.","enum":["single_engine","multi_engine"],"type":"string"},"per_engine":{"description":"Full per-engine detail (multi_engine mode).","items":{"additionalProperties":{},"type":"object"},"type":"array"},"results":{"description":"Per-query results (single_engine mode).","items":{"additionalProperties":false,"properties":{"cited":{"description":"Whether the domain was cited for this query.","type":"boolean"},"matching_urls":{"description":"Matching citation URLs found.","items":{"type":"string"},"type":"array"},"query":{"type":"string"},"rank":{"description":"1-based rank of the first matching citation.","type":"number"}},"required":["query","cited","matching_urls"],"type":"object"},"type":"array"},"summary":{"additionalProperties":false,"description":"Aggregate summary (single_engine mode).","properties":{"average_rank":{"description":"Average rank across cited queries.","type":"number"},"citation_rate":{"description":"Fraction of queries where domain was cited (0-1).","type":"number"},"queries_cited":{"type":"number"},"queries_total":{"type":"number"}},"required":["queries_total","queries_cited","citation_rate"],"type":"object"},"surface":{"description":"Engine surface type (single_engine mode only).","type":"string"}},"required":["domain","mode","fetched_at"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Check Google AI Overview presence"},"description":"Check whether Google shows an AI Overview for a query, and which URLs it cites. Uses SerpAPI (free tier: 100/month). Set SERPAPI_KEY.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"hl":{"default":"en","description":"Language code, default 'en'.","type":"string"},"location":{"description":"Location string, e.g. 'United States'. Affects AI Overview eligibility.","type":"string"},"query":{"description":"Search query to check for Google AI Overview.","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"signals_ai_overview","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"ai_overview_present":{"description":"Whether Google returned an AI Overview for this query.","type":"boolean"},"ai_overview_text":{"description":"AI Overview text, if present.","type":["string","null"]},"cached":{"description":"Whether the result was served from local cache.","type":"boolean"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"query":{"description":"The query checked.","type":"string"},"sources":{"description":"URLs cited in the AI Overview.","items":{"additionalProperties":false,"properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["url"],"type":"object"},"type":"array"}},"required":["query","fetched_at","ai_overview_present","ai_overview_text","sources","cached"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List cached queries domain was cited for"},"description":"List queries that the given domain has been cited for, served from the local cache. Build up a corpus by calling check_citations or am_i_cited first; cited_for queries it without spending API budget.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"domain":{"description":"Domain to look up, e.g. 'automatelab.tech'.","minLength":1,"type":"string"},"engine":{"description":"Filter by engine. Omit to include all.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","google_ai_mode"],"type":"string"},"limit":{"default":50,"description":"Maximum results.","maximum":500,"minimum":1,"type":"integer"},"since":{"description":"ISO date floor, e.g. '2026-01-01'. Only return entries fetched on or after this date.","type":"string"}},"required":["domain"],"type":"object"},"name":"domain_cited_for","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"domain":{"description":"Domain that was looked up.","type":"string"},"engine_filter":{"description":"Engine filter applied, if any.","type":"string"},"results":{"description":"Cache entries where this domain was cited.","items":{"additionalProperties":false,"properties":{"engine":{"type":"string"},"fetched_at":{"type":"string"},"query":{"type":"string"},"rank":{"type":"number"},"url":{"type":"string"}},"required":["query","engine","rank","url","fetched_at"],"type":"object"},"type":"array"},"since":{"description":"ISO date floor applied, if any.","type":"string"},"source":{"const":"local_cache","description":"Always 'local_cache' — no external calls made.","type":"string"},"total":{"description":"Total entries returned.","type":"number"}},"required":["domain","results","total","source"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Predict citation likelihood for a URL"},"description":"Score citation likelihood for a URL from public signals (Wikipedia link presence, schema.org markup, /llms.txt, GitHub and Reddit references, canonical hygiene, HTTPS). No LLM fired - all heuristic. Returns 0-100 score, grade, signal breakdown, and ranked fixes.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"url":{"description":"URL to score for citation likelihood. Must be absolute http(s).","format":"uri","type":"string"}},"required":["url"],"type":"object"},"name":"citations_predict","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"fixes":{"description":"Ranked list of concrete improvements to raise the score.","items":{"additionalProperties":false,"properties":{"signal":{"type":"string"},"suggestion":{"type":"string"}},"required":["signal","suggestion"],"type":"object"},"type":"array"},"grade":{"description":"Letter grade (A-F) derived from the score.","type":"string"},"score":{"description":"0-100 citation likelihood score.","maximum":100,"minimum":0,"type":"number"},"signals":{"additionalProperties":{},"description":"Per-signal boolean/numeric values used to compute the score.","type":"object"},"url":{"description":"URL that was scored.","type":"string"}},"required":["url","fetched_at","score","grade","signals","fixes"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Save or load a query panel"},"description":"Save, load, or list named query panels. A panel is a persisted set of queries you want to monitor over time (e.g. editorial-watchlist). Use action=save with queries[] to create, action=load to read, action=list to enumerate. Panels live under <config>/panels/<name>.json.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"action":{"default":"save","description":"'save' writes the panel, 'load' returns an existing panel, 'list' enumerates all panels.","enum":["save","load","list"],"type":"string"},"domain":{"description":"Default domain to track for this panel, e.g. 'automatelab.tech'.","type":"string"},"name":{"description":"Panel name, e.g. 'editorial-watchlist'. Used to save and recall the query set.","minLength":1,"type":"string"},"queries":{"description":"Queries to save under this panel. Omit to read the existing panel.","items":{"minLength":1,"type":"string"},"maxItems":100,"type":"array"}},"required":["name"],"type":"object"},"name":"panel_track","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"error":{"description":"Error message when the panel was not found.","type":"string"},"panel":{"additionalProperties":{},"description":"The panel object that was saved or loaded.","type":"object"},"panels":{"description":"All panel names (action=list).","items":{},"type":"array"},"saved":{"description":"True when action=save succeeded.","type":"boolean"}},"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"Run panel and save snapshot"},"description":"Run a saved panel through am_i_cited and append a timestamped snapshot. Side effects: makes external API calls to the configured AI engine (costs API quota); writes one snapshot file to disk at <config>/snapshots/<panel>/<iso>.json. Requires at least one engine API key (same as am_i_cited). Returns per-query citation presence and a citation_rate summary for the run. Use panel_track to create a panel first; use citations_trend to read the accumulated trend after multiple runs.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"domain":{"description":"Override the panel's default domain for this run.","type":"string"},"engine":{"default":"auto","description":"AI engine to query. Use bing_serp/brave_serp for web_rank comparison only — am_i_cited will refuse them.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","google_ai_mode","auto"],"type":"string"},"name":{"description":"Panel name previously saved via track_queries.","minLength":1,"type":"string"}},"required":["name"],"type":"object"},"name":"panel_run","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"saved_to":{"description":"Absolute file path of the snapshot that was written.","type":"string"},"snapshot":{"additionalProperties":false,"description":"The snapshot that was appended.","properties":{"domain":{"type":"string"},"engine":{"type":"string"},"panel":{"type":"string"},"per_query":{"items":{"additionalProperties":false,"properties":{"cited":{"description":"Whether the domain was cited for this query.","type":"boolean"},"matching_urls":{"description":"Matching citation URLs found.","items":{"type":"string"},"type":"array"},"query":{"type":"string"},"rank":{"description":"1-based rank of the first matching citation.","type":"number"}},"required":["query","cited","matching_urls"],"type":"object"},"type":"array"},"summary":{"additionalProperties":false,"properties":{"average_rank":{"description":"Average rank across cited queries.","type":"number"},"citation_rate":{"description":"Fraction of queries where domain was cited (0-1).","type":"number"},"queries_cited":{"type":"number"},"queries_total":{"type":"number"}},"required":["queries_total","queries_cited","citation_rate"],"type":"object"},"taken_at":{"type":"string"}},"required":["panel","domain","engine","taken_at","per_query","summary"],"type":"object"}},"required":["saved_to","snapshot"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":false,"title":"AI visibility report"},"description":"Turnkey AI visibility report for a domain across a query set. Composes check_citations over every query (or a saved panel) and returns the metrics AI-visibility trackers sell as a dashboard, in one call: mention frequency (citation_rate), share_of_voice vs competitors, average rank when cited, and brand sentiment from the answer text. Side effects: one check_citations call per query (costs API quota for uncached queries; cached queries are free). Returns structured summary + top_domains + per_query, plus a rendered Markdown report (include_markdown=true) suitable for a public page. Provide queries[] or a panel name. Same engine selection as check_citations.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"brand_terms":{"description":"Brand name variants to detect in answer text for sentiment (defaults to the domain's second-level label).","items":{"minLength":1,"type":"string"},"maxItems":10,"type":"array"},"competitors":{"description":"Optional competitor domains to surface explicitly in the share-of-voice table.","items":{"minLength":1,"type":"string"},"maxItems":20,"type":"array"},"domain":{"description":"The domain you are measuring visibility for (e.g. automatelab.tech).","minLength":1,"type":"string"},"engine":{"default":"auto","description":"AI engine to query. 'auto' picks the first configured key. Same selection as check_citations.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","google_ai_mode","auto"],"type":"string"},"include_markdown":{"default":true,"description":"If true (default), include a rendered Markdown report under `markdown`.","type":"boolean"},"max_results":{"default":10,"description":"Max citations to pull per query.","maximum":50,"minimum":1,"type":"integer"},"panel":{"description":"Name of a saved panel (see panel_track) to pull queries from. Provide this OR `queries`.","type":"string"},"queries":{"description":"Queries to run. Provide this OR `panel`. Each is sent to the AI engine via check_citations.","items":{"minLength":1,"type":"string"},"maxItems":50,"type":"array"}},"required":["domain"],"type":"object"},"name":"report_visibility","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"error":{"type":"string"},"markdown":{"description":"Rendered Markdown report. Present when include_markdown=true.","type":"string"},"per_query":{"items":{"additionalProperties":false,"properties":{"cited":{"type":"boolean"},"query":{"type":"string"},"rank":{"type":["number","null"]},"sentiment":{"type":["number","null"]},"sentiment_label":{"enum":["positive","neutral","negative","n/a"],"type":"string"},"top_competitor":{"type":["string","null"]}},"required":["query","cited","rank","sentiment","sentiment_label","top_competitor"],"type":"object"},"type":"array"},"summary":{"additionalProperties":false,"properties":{"average_rank":{"description":"Mean citation rank when cited (null if never cited).","type":["number","null"]},"average_sentiment":{"description":"Mean sentiment [-1,1] of answer text mentioning the brand (null if never mentioned).","type":["number","null"]},"citation_rate":{"description":"Mention frequency: % of queries where the domain is cited.","type":"number"},"domain":{"type":"string"},"engine":{"type":"string"},"generated_at":{"type":"string"},"queries_cited":{"type":"number"},"queries_total":{"type":"number"},"sentiment_breakdown":{"additionalProperties":false,"properties":{"negative":{"type":"number"},"neutral":{"type":"number"},"positive":{"type":"number"}},"required":["positive","neutral","negative"],"type":"object"},"share_of_voice":{"description":"% of all cited sources across the query set that belong to the domain.","type":"number"}},"required":["domain","engine","generated_at","queries_total","queries_cited","citation_rate","share_of_voice","average_rank","average_sentiment","sentiment_breakdown"],"type":"object"},"top_domains":{"description":"Share-of-voice table, most-cited domains first.","items":{"additionalProperties":false,"properties":{"citations":{"type":"number"},"domain":{"type":"string"},"is_competitor":{"type":"boolean"},"is_target":{"type":"boolean"},"share":{"description":"Share of all citations, percent.","type":"number"}},"required":["domain","citations","share","is_target","is_competitor"],"type":"object"},"type":"array"}},"required":["summary","top_domains","per_query"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Report citation trend over time"},"description":"Report citation rate over time for a panel from stored snapshots. Read-only; cache-only — makes no API calls to any AI engine and costs no API quota. Reads snapshot files from <config>/snapshots/<panel>/. Returns: snapshots[] (one entry per panel_run invocation, each with timestamp and citation_rate), plus per-query deltas (gained/lost/unchanged) comparing first vs last snapshot. Returns an empty series when no snapshots exist yet. No auth required. No rate limits. Use panel_run to accumulate snapshots first; use since to restrict the time window.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"panel":{"description":"Panel name to report on.","minLength":1,"type":"string"},"since":{"description":"ISO date floor, e.g. '2026-01-01'. Only include snapshots on or after.","type":"string"}},"required":["panel"],"type":"object"},"name":"citations_trend","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"domain":{"description":"Domain tracked by the panel.","type":"string"},"first_taken_at":{"description":"Timestamp of the oldest snapshot.","type":"string"},"last_taken_at":{"description":"Timestamp of the newest snapshot.","type":"string"},"panel":{"description":"Panel name.","type":"string"},"query_deltas":{"description":"Per-query changes between first and last snapshot.","items":{"additionalProperties":false,"properties":{"change":{"enum":["gained","lost","unchanged"],"type":"string"},"first":{"type":"boolean"},"last":{"type":"boolean"},"query":{"type":"string"}},"required":["query","change","first","last"],"type":"object"},"type":"array"},"series":{"description":"Time-series of citation rates, one entry per snapshot.","items":{"additionalProperties":false,"properties":{"citation_rate":{"description":"Citation rate at this snapshot (0-1).","type":"number"},"engine":{"type":"string"},"queries_cited":{"type":"number"},"queries_total":{"type":"number"},"taken_at":{"type":"string"}},"required":["taken_at","engine","queries_total","queries_cited","citation_rate"],"type":"object"},"type":"array"},"snapshots":{"description":"Number of snapshots available.","type":"number"}},"required":["panel","snapshots","series","query_deltas"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Compare citation signals across URLs"},"description":"Run predict_citation on 2-10 URLs and return a side-by-side signal table plus a list of signals where the URLs diverge. Use to compare your URL to top-cited competitors for the same query.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"urls":{"description":"URLs to compare side-by-side. 2-10 URLs. One is typically yours and the rest are cited competitors.","items":{"format":"uri","type":"string"},"maxItems":10,"minItems":2,"type":"array"}},"required":["urls"],"type":"object"},"name":"competitors_compare","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"diverging_signals":{"description":"Signals where at least one URL differs from the others.","items":{"additionalProperties":false,"properties":{"per_url":{"items":{"additionalProperties":false,"properties":{"url":{"type":"string"},"value":{"type":"boolean"}},"required":["url","value"],"type":"object"},"type":"array"},"signal":{"description":"Signal name where URLs differ.","type":"string"}},"required":["signal","per_url"],"type":"object"},"type":"array"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"rows":{"description":"Per-URL predict_citation rows (or { url, error } on failure).","items":{"additionalProperties":{},"type":"object"},"type":"array"}},"required":["fetched_at","rows","diverging_signals"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Find Wikipedia articles citing a domain"},"description":"List Wikipedia articles that reference the given domain. Read-only. One HTTPS GET to the Wikipedia API (en.wikipedia.org/w/api.php?action=query&list=exturlusage). No auth required; no API keys; no rate limits beyond Wikipedia's public API fair-use policy (~1 request/second). Returns article titles and URLs. Wikipedia backlinks are the highest-lift signal for LLM training corpora — a domain cited from Wikipedia is far more likely to appear in AI training data and citation pools. Use lang to query non-English Wikipedias.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"domain":{"description":"Domain to search for, e.g. 'automatelab.tech' (without protocol).","minLength":1,"type":"string"},"lang":{"default":"en","description":"Wikipedia language subdomain, e.g. 'en', 'de', 'fr'.","type":"string"},"limit":{"default":20,"description":"Maximum mention rows to return.","maximum":100,"minimum":1,"type":"integer"}},"required":["domain"],"type":"object"},"name":"signals_wikipedia","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"domain":{"description":"Domain that was searched.","type":"string"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"lang":{"description":"Wikipedia language subdomain used.","type":"string"},"mentions":{"description":"List of Wikipedia articles that cite the domain.","items":{"additionalProperties":false,"properties":{"article_title":{"description":"Wikipedia article title.","type":"string"},"article_url":{"description":"Full Wikipedia article URL.","type":"string"},"cited_url":{"description":"The specific external URL referenced.","type":"string"}},"type":"object"},"type":"array"},"total":{"description":"Number of Wikipedia articles referencing this domain.","type":"number"}},"required":["domain","lang","fetched_at","total","mentions"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Audit all URLs in a sitemap"},"description":"Fetch a sitemap.xml (or sitemap index) and run predict_citation on every URL. Returns results sorted worst-score-first. Surfaces systemic issues across a whole site in one pass. Zero engine keys needed.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"concurrency":{"default":3,"description":"Parallel predict_citation calls. Higher is faster but more rate-limit risk.","maximum":10,"minimum":1,"type":"integer"},"limit":{"default":50,"description":"Max URLs to score. Sitemap is sliced after parsing.","maximum":500,"minimum":1,"type":"integer"},"sitemap_url":{"description":"URL of sitemap.xml (or a sitemap index). Nested sitemaps are followed.","format":"uri","type":"string"}},"required":["sitemap_url"],"type":"object"},"name":"audit_sitemap","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"audited":{"description":"Number of URLs that were scored.","type":"number"},"average_score":{"description":"Mean predict_citation score across scored URLs.","type":"number"},"errors":{"description":"URLs whose audit threw an error.","items":{"additionalProperties":false,"properties":{"error":{"type":"string"},"url":{"type":"string"}},"required":["url","error"],"type":"object"},"type":"array"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"sitemap_url":{"description":"The sitemap URL that was audited.","type":"string"},"total_urls":{"description":"Total URLs found in the sitemap.","type":"number"},"worst_first":{"description":"Up to 20 lowest-scoring URLs, worst first.","items":{"additionalProperties":false,"properties":{"grade":{"type":"string"},"score":{"type":"number"},"signals":{"additionalProperties":{},"type":"object"},"top_fix":{"description":"Top suggested fix for this URL.","type":"string"},"url":{"type":"string"}},"required":["url","score","grade","signals"],"type":"object"},"type":"array"}},"required":["sitemap_url","fetched_at","total_urls","audited","average_score","worst_first","errors"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Competitive citation snapshot for a query"},"description":"End-to-end competitive snapshot for a single query. Calls check_citations to get the cited URLs, then runs compare_domains on your_url vs the top cited competitors. Returns your score, the average competitor score, and the gap.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"engine":{"default":"auto","description":"AI engine to query for the citation set. 'auto' picks the first available key.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","google_ai_mode","auto"],"type":"string"},"max_competitors":{"default":4,"description":"How many cited URLs to compare against your_url. Capped at 9 (compare_domains accepts max 10 URLs total including yours).","maximum":9,"minimum":1,"type":"integer"},"query":{"description":"Search query to test (what would a user ask an AI?).","minLength":1,"type":"string"},"your_url":{"description":"Your URL to benchmark against the cited competitors.","format":"uri","type":"string"}},"required":["query","your_url"],"type":"object"},"name":"competitors_compete","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"average_competitor_score":{"description":"Mean score across competitor URLs.","type":["number","null"]},"comparison":{"anyOf":[{"additionalProperties":{},"type":"object"},{"type":"null"}],"description":"Full compare_domains result."},"competitors":{"description":"Competitor URLs that were compared.","items":{"type":"string"},"type":"array"},"engine":{"description":"Engine used for the citation fetch.","type":"string"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"query":{"description":"The query that was tested.","type":"string"},"score_gap":{"description":"your_score minus average_competitor_score.","type":["number","null"]},"your_in_citations":{"description":"Whether your URL appeared in the engine's citation list.","type":"boolean"},"your_score":{"description":"predict_citation score for your URL (null on error).","type":["number","null"]},"your_url":{"description":"Your URL that was benchmarked.","type":"string"}},"required":["query","engine","fetched_at","your_url","your_score","your_in_citations","competitors","average_competitor_score","score_gap","comparison"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Score freshness of AI-cited pages"},"description":"Score how recent the pages cited for a query are. Calls check_citations, then collects dateModified for each cited URL, returns a 0-100 recency_score (halflife=365d) plus per-URL freshness bucket (fresh/current/stale/ancient/unknown). Surfaces queries where AI cites old content - opportunity to ship fresher.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"engine":{"default":"auto","description":"AI engine to query for the citation set.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","google_ai_mode","auto"],"type":"string"},"max_results":{"default":10,"description":"How many cited URLs to inspect.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"Search query whose cited URLs to score for freshness.","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"citations_freshness","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"average_days_old":{"description":"Mean age in days across URLs with a detectable dateModified.","type":["number","null"]},"buckets":{"additionalProperties":false,"description":"Freshness bucket distribution.","properties":{"ancient":{"description":"URLs older than 730 days.","type":"number"},"current":{"description":"URLs modified within 181-365 days.","type":"number"},"fresh":{"description":"URLs modified within 180 days.","type":"number"},"stale":{"description":"URLs modified within 366-730 days.","type":"number"},"unknown":{"description":"URLs with no detectable modification date.","type":"number"}},"required":["fresh","current","stale","ancient","unknown"],"type":"object"},"engine":{"description":"Engine used.","type":"string"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"note":{"type":"string"},"per_url":{"description":"Per-URL freshness details.","items":{"additionalProperties":{},"type":"object"},"type":"array"},"query":{"description":"The query whose citations were scored.","type":"string"},"recency_score":{"description":"0-100 average recency weight across cited URLs (halflife=365d).","maximum":100,"minimum":0,"type":"number"}},"required":["query","engine","fetched_at","recency_score","average_days_old","buckets","per_url"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Diff citation changes between time windows"},"description":"Diff cited_for between two time windows for a domain. Returns queries gained (cited now, not before baseline_until) and queries lost (cited before, not since current_since). Cache-only, no API spend. Use to track citation drift over time after publishing or migrating content.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"baseline_until":{"description":"ISO date (or ISO datetime). Baseline window = all cache entries fetched on or before this timestamp.","type":"string"},"current_since":{"description":"ISO date floor for the 'current' window. Defaults to baseline_until.","type":"string"},"domain":{"description":"Domain to diff, e.g. 'automatelab.tech'.","minLength":1,"type":"string"},"engine":{"description":"Filter by engine. Omit to include all.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","google_ai_mode"],"type":"string"}},"required":["domain","baseline_until"],"type":"object"},"name":"domain_cited_for_diff","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"baseline_until":{"description":"Upper bound of the baseline window.","type":"string"},"counts":{"additionalProperties":false,"properties":{"baseline_unique_queries":{"type":"number"},"current_unique_queries":{"type":"number"},"gained":{"description":"Queries newly cited in the current window.","type":"number"},"lost":{"description":"Queries cited in baseline but not current.","type":"number"},"unchanged":{"description":"Queries cited in both windows.","type":"number"}},"required":["baseline_unique_queries","current_unique_queries","gained","lost","unchanged"],"type":"object"},"current_since":{"description":"Lower bound of the current window.","type":"string"},"domain":{"description":"Domain that was diffed.","type":"string"},"engine_filter":{"description":"Engine filter applied, if any.","type":"string"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"gained":{"description":"Queries gained (newly cited) since the baseline.","items":{"additionalProperties":false,"properties":{"engine":{"type":"string"},"fetched_at":{"type":"string"},"query":{"type":"string"},"rank":{"type":"number"},"url":{"type":"string"}},"required":["query","engine","rank","fetched_at","url"],"type":"object"},"type":"array"},"lost":{"description":"Queries lost (were cited, no longer are).","items":{"additionalProperties":false,"properties":{"engine":{"type":"string"},"fetched_at":{"type":"string"},"query":{"type":"string"},"url":{"type":"string"}},"required":["query","engine","fetched_at","url"],"type":"object"},"type":"array"},"source":{"const":"local_cache","type":"string"},"unchanged_queries":{"description":"Queries cited in both windows.","items":{"type":"string"},"type":"array"}},"required":["domain","baseline_until","current_since","fetched_at","counts","gained","lost","unchanged_queries","source"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Find GSC queries not cited by AI"},"description":"Join Google Search Console performance with am_i_cited per query. Surfaces queries where the domain ranks well in Google but is not cited in AI - the closest editorial wins. Requires GCP service account creds (credentials_path or GOOGLE_APPLICATION_CREDENTIALS env).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"credentials_path":{"description":"Path to GCP service account JSON. Defaults to env GOOGLE_APPLICATION_CREDENTIALS.","type":"string"},"domain":{"description":"Domain to analyze, e.g. 'automatelab.tech'. Used both for the GSC site URL and the citation check.","minLength":1,"type":"string"},"end_date":{"description":"ISO date for GSC range end, e.g. '2026-05-01'.","type":"string"},"engine":{"default":"auto","description":"AI engine for the citation check.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","google_ai_mode","auto"],"type":"string"},"queries":{"description":"Queries to cross-reference. 1-20 per call.","items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"site_url":{"description":"Override the GSC siteUrl. Defaults to 'sc-domain:<domain>'.","type":"string"},"start_date":{"description":"ISO date for GSC range start, e.g. '2026-04-01'.","type":"string"}},"required":["domain","queries","start_date","end_date"],"type":"object"},"name":"signals_gsc_gap","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"closest_wins":{"description":"Queries where domain ranks in Google top-10 but is not AI-cited (the editorial gap).","items":{"additionalProperties":{},"type":"object"},"type":"array"},"domain":{"description":"Domain analyzed.","type":"string"},"engine":{"description":"Engine used for the citation check.","type":"string"},"range":{"additionalProperties":false,"description":"GSC date range.","properties":{"end":{"type":"string"},"start":{"type":"string"}},"required":["start","end"],"type":"object"},"rows":{"description":"Per-query GSC + AI citation cross-reference.","items":{"additionalProperties":false,"properties":{"ai_cited":{"description":"Whether the domain was cited by the AI engine for this query.","type":"boolean"},"ai_rank":{"type":"number"},"gsc":{"additionalProperties":false,"properties":{"clicks":{"type":"number"},"ctr":{"type":"number"},"impressions":{"type":"number"},"position":{"type":"number"}},"required":["impressions","clicks"],"type":"object"},"query":{"type":"string"}},"required":["query","gsc","ai_cited"],"type":"object"},"type":"array"},"site_url":{"description":"GSC siteUrl used.","type":"string"}},"required":["domain","site_url","range","rows","closest_wins"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Find Bing queries not cited by AI"},"description":"Join Bing Webmaster Tools query stats with am_i_cited per query. Surfaces queries where the domain ranks well in Bing but is not cited in AI - the closest editorial wins. Bing's index backs Copilot/ChatGPT/Perplexity grounding, so a Bing rank gap is an LLM-citation gap. Requires BING_WEBMASTER_API_KEY (Bing Webmaster Tools -> Settings -> API Access).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"domain":{"description":"Domain to analyze, e.g. 'automatelab.tech'. Used for the citation check.","minLength":1,"type":"string"},"engine":{"default":"auto","description":"AI engine for the citation check.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","google_ai_mode","auto"],"type":"string"},"queries":{"description":"Queries to cross-reference. 1-20 per call.","items":{"minLength":1,"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"site_url":{"description":"Verified Bing Webmaster site URL. Defaults to 'https://<domain>/'. Bing uses the https origin WITH a trailing slash, NOT the sc-domain: form GSC uses.","type":"string"}},"required":["domain","queries"],"type":"object"},"name":"signals_bing_gap","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"closest_wins":{"description":"Queries where domain ranks in Bing top-10 but is not AI-cited (the editorial gap).","items":{"additionalProperties":{},"type":"object"},"type":"array"},"domain":{"description":"Domain analyzed.","type":"string"},"engine":{"description":"Engine used for the citation check.","type":"string"},"rows":{"description":"Per-query Bing rank + AI citation cross-reference.","items":{"additionalProperties":false,"properties":{"ai_cited":{"description":"Whether the domain was cited by the AI engine for this query.","type":"boolean"},"ai_rank":{"type":"number"},"bing":{"anyOf":[{"additionalProperties":false,"properties":{"clicks":{"type":"number"},"impressions":{"type":"number"},"position":{"type":"number"}},"required":["impressions","clicks","position"],"type":"object"},{"type":"null"}],"description":"Bing Webmaster stats for this query, or null if the query is not in Bing's returned top-set."},"query":{"type":"string"}},"required":["query","bing","ai_cited"],"type":"object"},"type":"array"},"site_url":{"description":"Bing Webmaster siteUrl used (https origin with trailing slash).","type":"string"}},"required":["domain","site_url","rows","closest_wins"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Audit schema.org structured data"},"description":"Deep schema.org validation for a URL. Parses every JSON-LD block and microdata node, checks required fields per @type (Article needs headline+author+datePublished, FAQPage needs mainEntity, HowTo needs step, etc.), and flags missing fields and malformed JSON-LD. Returns issues list and a valid/invalid verdict. Use to fix structured-data bugs that predict_citation flags but can't explain.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"url":{"description":"URL whose JSON-LD and microdata to validate against schema.org expected fields.","format":"uri","type":"string"}},"required":["url"],"type":"object"},"name":"audit_schema","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"issues":{"description":"Validation issues found.","items":{"additionalProperties":false,"properties":{"message":{"type":"string"},"path":{"type":"string"},"severity":{"enum":["error","warning"],"type":"string"},"type":{"type":"string"}},"required":["type","path","severity","message"],"type":"object"},"type":"array"},"json_ld_blocks":{"description":"Total JSON-LD blocks found.","type":"number"},"json_ld_parse_errors":{"description":"Number of JSON-LD blocks that failed to parse.","type":"number"},"microdata_types_present":{"description":"Schema types found via microdata (itemtype).","items":{"type":"string"},"type":"array"},"note":{"type":"string"},"schema_types_present":{"description":"@type values found across all JSON-LD blocks.","items":{"type":"string"},"type":"array"},"summary":{"additionalProperties":false,"properties":{"blocks":{"type":"number"},"errors":{"type":"number"},"typed_nodes":{"type":"number"},"valid":{"description":"True when no typed node is missing a required field.","type":"boolean"},"warnings":{"type":"number"}},"required":["blocks","typed_nodes","errors","warnings","valid"],"type":"object"},"url":{"description":"URL that was audited.","type":"string"}},"required":["url","fetched_at","json_ld_blocks","json_ld_parse_errors","schema_types_present","microdata_types_present","issues","summary"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Generate llms.txt from sitemap"},"description":"Generate an llms.txt file (https://llmstxt.org spec) from a sitemap. Parses sitemap.xml + nested indexes, groups URLs by top-level path, and emits a Markdown document with H1+description+sectioned link lists. Set fetch_titles=true to pull <title> per URL (slower, richer output).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"fetch_titles":{"default":false,"description":"If true, fetch each URL to extract <title> for richer links. Slower (one HEAD-ish GET per URL). Default false uses the URL path as the link text.","type":"boolean"},"limit":{"default":100,"description":"Max URLs to include. Truncated after sitemap parse, before title fetch.","maximum":500,"minimum":1,"type":"integer"},"site_description":{"description":"One-paragraph site description placed under the H1. Optional but strongly recommended.","type":"string"},"site_title":{"description":"Site title - top H1 in the generated llms.txt file.","minLength":1,"type":"string"},"sitemap_url":{"description":"URL of sitemap.xml (or sitemap index). Nested sitemaps are followed.","format":"uri","type":"string"}},"required":["sitemap_url","site_title"],"type":"object"},"name":"audit_llms_txt","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"content":{"description":"Generated llms.txt file content; save to /llms.txt at site root.","type":"string"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"note":{"type":"string"},"sections":{"description":"Number of top-level sections in the generated file.","type":"number"},"sitemap_url":{"description":"Sitemap URL that was processed.","type":"string"},"titles_fetched":{"description":"Number of pages fetched to extract <title>.","type":"number"},"total_urls_in_sitemap":{"description":"Total URLs found in the sitemap.","type":"number"},"urls_included":{"description":"URLs included after applying the limit.","type":"number"}},"required":["sitemap_url","fetched_at","total_urls_in_sitemap","urls_included","titles_fetched","sections","content"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Locate citation positions in AI answer"},"description":"Locate where each cited URL appears in the AI's raw answer text. Calls check_citations, finds the first mention of each citation's URL (or hostname) in raw_answer, and bins by char position into early/middle/late thirds. Surfaces whether your URL is cited up-front or buried near the end. Returns 'unknown' for engines without raw_answer (Bing, Brave).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"engine":{"default":"auto","description":"AI engine to query. web_rank engines (bing_serp, brave_serp) lack raw_answer and will return position 'unknown'.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","brave","google_ai_mode","auto"],"type":"string"},"max_results":{"default":10,"description":"Max citations to locate.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"Search query whose AI answer to measure citation positions on.","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"signals_answer_box","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"answer_chars":{"description":"Total length of the engine's raw answer in characters.","type":"number"},"buckets":{"additionalProperties":false,"description":"Count of citations per position bucket.","properties":{"early":{"type":"number"},"late":{"type":"number"},"middle":{"type":"number"},"unknown":{"type":"number"}},"required":["early","middle","late","unknown"],"type":"object"},"citations_total":{"description":"Total citations returned by the engine.","type":"number"},"engine":{"description":"Engine used.","type":"string"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"note":{"type":"string"},"positions":{"description":"Per-citation position in the AI answer.","items":{"additionalProperties":false,"properties":{"first_mention_char":{"description":"Character offset of first mention in raw_answer.","type":["number","null"]},"position":{"description":"Third of the answer where the URL first appears.","enum":["early","middle","late","unknown"],"type":"string"},"rank":{"type":"number"},"title":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"url":{"type":"string"}},"required":["url","rank","first_mention_char","position"],"type":"object"},"type":"array"},"query":{"description":"The query that was tested.","type":"string"}},"required":["query","engine","fetched_at","answer_chars","citations_total","positions","buckets"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Cross-engine citation provenance"},"description":"Fan a query out across multiple AI engines and report per-URL cross-engine consensus. Returns each unique cited URL with the list of engines that cited it, plus a consensus_urls list (URLs cited by ALL engines). High engine_count = strong cross-engine citation signal; engine_count=1 = engine-specific.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"engines":{"description":"Engines to query. If omitted, uses all LLM engines with a configured API key (perplexity, claude, openai, gemini, google_ai_mode). Include bing_serp/brave_serp only when you explicitly want web_rank comparison.","items":{"enum":["perplexity","claude","openai","gemini","google_ai_mode","bing_serp","brave_serp"],"type":"string"},"maxItems":7,"minItems":1,"type":"array"},"max_results":{"default":10,"description":"Max citations per engine.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"Search query to fan out across multiple engines.","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"citations_provenance","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"consensus_urls":{"description":"URLs cited by ALL succeeding engines (requires >=2 engines).","items":{"type":"string"},"type":"array"},"engines":{"description":"Per-engine run summary.","items":{"additionalProperties":false,"properties":{"citations":{"type":"number"},"engine":{"type":"string"},"error":{"type":"string"},"interpretation_note":{"type":"string"},"ok":{"type":"boolean"},"surface":{"type":"string"}},"required":["engine","ok","citations"],"type":"object"},"type":"array"},"engines_queried":{"type":"number"},"engines_succeeded":{"type":"number"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"note":{"type":"string"},"per_url":{"description":"All unique cited URLs sorted by cross-engine consensus (engine_count desc).","items":{"additionalProperties":false,"properties":{"cited_by":{"description":"Engines that cited this URL.","items":{"type":"string"},"type":"array"},"engine_count":{"description":"Number of engines that cited this URL.","type":"number"},"url":{"type":"string"}},"required":["url","cited_by","engine_count"],"type":"object"},"type":"array"},"query":{"description":"The query that was fanned across engines.","type":"string"},"summary":{"additionalProperties":false,"properties":{"consensus_count":{"type":"number"},"median_engines_per_url":{"type":"number"},"total_unique_urls":{"type":"number"}},"required":["total_unique_urls","consensus_count","median_engines_per_url"],"type":"object"}},"required":["query","fetched_at","engines","engines_queried","engines_succeeded","per_url","consensus_urls","summary"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Extract citation evidence from AI answer"},"description":"Extract the cited snippet from the AI engine's raw answer for each citation. Calls check_citations, then for each returned URL finds the first mention in raw_answer and returns a context window plus the nearest quoted span or containing sentence. Use to see *why* an engine cited a URL, not just *that* it did. Returns 'not found' for engines without raw_answer (Bing, Brave).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"context_chars":{"default":240,"description":"Half-width of the snippet window around each citation mention (chars). Total snippet is up to 2x this.","maximum":800,"minimum":40,"type":"integer"},"engine":{"default":"auto","description":"AI engine to query. web_rank engines (bing_serp, brave_serp) lack raw_answer and return no evidence.","enum":["perplexity","claude","openai","gemini","bing_serp","brave_serp","google_ai_mode","auto"],"type":"string"},"max_results":{"default":10,"description":"Max citations to extract evidence for.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"Search query whose AI answer to extract citation evidence from.","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"citations_evidence","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"citations_total":{"type":"number"},"engine":{"description":"Engine used.","type":"string"},"evidence":{"description":"Per-citation evidence extracted from the raw answer.","items":{"additionalProperties":false,"properties":{"found":{"description":"Whether the URL was found in raw_answer.","type":"boolean"},"matched":{"description":"The candidate string that matched.","type":"string"},"mention_char":{"description":"Character offset of first mention.","type":["number","null"]},"nearby_quote":{"description":"Nearest quoted span or containing sentence.","type":["string","null"]},"rank":{"type":"number"},"snippet":{"description":"Context window around the first mention.","type":["string","null"]},"title":{"anyOf":[{"anyOf":[{"not":{}},{"type":"string"}]},{"type":"null"}]},"url":{"type":"string"}},"required":["url","rank","found","snippet","nearby_quote","mention_char"],"type":"object"},"type":"array"},"evidence_found":{"description":"Citations whose URL was located in the raw answer.","type":"number"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"has_raw_answer":{"description":"Whether the engine returned a raw answer.","type":"boolean"},"note":{"type":"string"},"query":{"description":"The query whose answer was analyzed.","type":"string"},"raw_answer_chars":{"description":"Length of the engine's raw answer.","type":"number"}},"required":["query","engine","fetched_at","raw_answer_chars","has_raw_answer","citations_total","evidence_found","evidence"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Audit AI crawler access to a URL"},"description":"Verify that major AI crawlers (GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot, CCBot, Google-Extended, Applebot-Extended, Bytespider, Meta-ExternalAgent, plus real-time fetch UAs) can fetch a URL. Parses robots.txt and does a live GET with each bot's User-Agent. Surfaces robots.txt blocks AND UA-based gating that breaks AI citation.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"bots":{"description":"Override the default bot list. Each entry is a User-Agent token (e.g. 'GPTBot', 'ClaudeBot').","items":{"type":"string"},"maxItems":20,"minItems":1,"type":"array"},"fetch_with_ua":{"default":true,"description":"If true, do a live GET as each bot's User-Agent and report status. Disable to only parse robots.txt (no extra requests).","type":"boolean"},"url":{"description":"Page URL to test for AI crawler access.","format":"uri","type":"string"}},"required":["url"],"type":"object"},"name":"audit_crawler_access","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"bots":{"description":"Per-bot access verdict combining robots.txt + live UA test.","items":{"additionalProperties":false,"properties":{"fetch_error":{"type":["string","null"]},"fetch_ok":{"type":["boolean","null"]},"fetch_status":{"type":["number","null"]},"name":{"type":"string"},"operator":{"type":"string"},"purpose":{"type":"string"},"robots_allowed":{"anyOf":[{"type":"boolean"},{"const":"unknown","type":"string"}]},"robots_rule":{"type":["string","null"]},"ua_token":{"type":"string"},"verdict":{"enum":["allowed","blocked","robots_only_allowed","robots_only_blocked","unknown"],"type":"string"}},"required":["name","ua_token","operator","purpose","robots_allowed","robots_rule","fetch_status","fetch_ok","fetch_error","verdict"],"type":"object"},"type":"array"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"note":{"type":"string"},"robots_error":{"description":"Error message if robots.txt fetch failed.","type":["string","null"]},"robots_present":{"description":"Whether a non-empty robots.txt was found.","type":"boolean"},"robots_status":{"description":"HTTP status of the robots.txt fetch.","type":["number","null"]},"robots_url":{"description":"robots.txt URL that was parsed.","type":"string"},"summary":{"additionalProperties":false,"properties":{"allowed":{"type":"number"},"blocked":{"type":"number"},"total":{"type":"number"},"unknown":{"type":"number"}},"required":["total","allowed","blocked","unknown"],"type":"object"},"url":{"description":"The URL that was audited.","type":"string"}},"required":["url","robots_url","robots_status","robots_present","robots_error","fetched_at","bots","summary"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Map sitemap URLs against citation cache"},"description":"Cross-reference a sitemap with the citation cache. For each sitemap URL, reports whether it appears in cached citations (and how many queries/engines cited it). Inverse of audit_sitemap: not 'how citable is each URL', but 'has each URL actually been cited yet'. Cache must be primed via check_citations or run_panel first.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"domain":{"description":"Domain to look up citations for. If omitted, inferred from the sitemap host.","minLength":1,"type":"string"},"limit":{"default":500,"description":"Max sitemap URLs to consider.","maximum":5000,"minimum":1,"type":"integer"},"since":{"description":"ISO date floor; only count citations recorded on or after this date.","type":"string"},"sitemap_url":{"description":"URL of sitemap.xml (or a sitemap index). Nested sitemaps are followed.","format":"uri","type":"string"}},"required":["sitemap_url"],"type":"object"},"name":"audit_sitemap_map","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"citations_in_cache":{"description":"Total citation cache entries for this domain.","type":"number"},"coverage_pct":{"description":"Percentage of sitemap URLs that have been cited (0-100).","type":"number"},"domain":{"description":"Domain whose citation cache was queried.","type":"string"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"mapped":{"description":"URLs found in the citation cache.","type":"number"},"mapped_urls":{"description":"Sitemap URLs present in the cache, sorted by citation count desc.","items":{"additionalProperties":false,"properties":{"citation_count":{"type":"number"},"engines":{"items":{"type":"string"},"type":"array"},"last_seen":{"type":"string"},"sample_queries":{"items":{"type":"string"},"type":"array"},"unique_queries":{"type":"number"},"url":{"type":"string"}},"required":["url","citation_count","unique_queries","engines","last_seen","sample_queries"],"type":"object"},"type":"array"},"note":{"type":"string"},"since":{"type":"string"},"sitemap_url":{"description":"The sitemap that was processed.","type":"string"},"total_urls":{"description":"Total sitemap URLs considered.","type":"number"},"unmapped":{"description":"URLs not yet seen in the citation cache.","type":"number"},"unmapped_urls":{"description":"Sitemap URLs not yet cited (up to 200).","items":{"additionalProperties":false,"properties":{"url":{"type":"string"}},"required":["url"],"type":"object"},"type":"array"}},"required":["sitemap_url","domain","fetched_at","total_urls","mapped","unmapped","coverage_pct","citations_in_cache","mapped_urls","unmapped_urls"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Identify canonical competitor domains for a query"},"description":"Fan a query across engines and aggregate citations by registered domain (not URL). Returns top competitor domains ranked by cross-engine consensus, with per-engine breakdown and top URLs per domain. Use to identify the canonical competitor set for a query - the domains every engine treats as authoritative.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"engines":{"description":"Engines to query. If omitted, uses all LLM engines with a configured API key (google_ai_mode, perplexity, claude, openai, gemini). Include bing_serp/brave_serp only for web_rank comparison.","items":{"enum":["perplexity","claude","openai","gemini","google_ai_mode","bing_serp","brave_serp"],"type":"string"},"maxItems":7,"minItems":1,"type":"array"},"exclude_domains":{"description":"Domains to filter out (e.g. your own brand, Wikipedia, Reddit). Suffix-match.","items":{"type":"string"},"maxItems":50,"type":"array"},"max_results":{"default":10,"description":"Max citations per engine.","maximum":20,"minimum":1,"type":"integer"},"query":{"description":"Search query to fan out across engines.","minLength":1,"type":"string"},"top_n":{"default":10,"description":"Max competitor domains to return.","maximum":50,"minimum":1,"type":"integer"}},"required":["query"],"type":"object"},"name":"competitors_canonical_set","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"domains":{"description":"Competitor domains ranked by cross-engine consensus.","items":{"additionalProperties":false,"properties":{"best_rank":{"description":"Best (lowest) rank across all citations.","type":"number"},"by_engine":{"items":{"additionalProperties":false,"properties":{"best_rank":{"type":"number"},"citations":{"type":"number"},"engine":{"type":"string"},"sample_urls":{"items":{"type":"string"},"type":"array"}},"required":["engine","citations","best_rank","sample_urls"],"type":"object"},"type":"array"},"domain":{"description":"Registered domain (eTLD+1).","type":"string"},"engine_count":{"description":"Number of engines that cited this domain.","type":"number"},"top_urls":{"description":"Most-cited URLs for this domain.","items":{"additionalProperties":false,"properties":{"count":{"type":"number"},"url":{"type":"string"}},"required":["url","count"],"type":"object"},"type":"array"},"total_citations":{"type":"number"}},"required":["domain","total_citations","engine_count","best_rank","by_engine","top_urls"],"type":"object"},"type":"array"},"engines":{"description":"Per-engine run summary.","items":{"additionalProperties":false,"properties":{"citations":{"type":"number"},"engine":{"type":"string"},"error":{"type":"string"},"ok":{"type":"boolean"}},"required":["engine","ok","citations"],"type":"object"},"type":"array"},"engines_queried":{"type":"number"},"engines_succeeded":{"type":"number"},"excluded_domains":{"description":"Registered domains that were filtered out.","items":{"type":"string"},"type":"array"},"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"note":{"type":"string"},"query":{"description":"The query that was fanned across engines.","type":"string"},"top_n":{"description":"Maximum domains returned.","type":"number"},"total_unique_domains":{"description":"Total unique competitor domains found before top_n truncation.","type":"number"}},"required":["query","fetched_at","engines","engines_queried","engines_succeeded","excluded_domains","total_unique_domains","top_n","domains"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Suggest missing JSON-LD for a URL"},"description":"Suggest missing JSON-LD additions for a URL. Fetches the page, detects existing schema types, and returns ready-to-paste templates for types that are missing but signalled by page content (BlogPosting from og:type=article or bylines, FAQPage from Q&A pairs, HowTo from numbered steps, BreadcrumbList from nested paths, Organization on homepages). Templates are pre-filled from page metadata where possible; fields marked FILL: require manual completion.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"url":{"description":"URL to inspect for missing JSON-LD. The page is fetched and its content signals are used to suggest schema types.","format":"uri","type":"string"}},"required":["url"],"type":"object"},"name":"audit_structured_data","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"fetched_at":{"description":"UTC ISO-8601 timestamp.","type":"string"},"note":{"type":"string"},"schema_types_present":{"description":"@type values already present on the page.","items":{"type":"string"},"type":"array"},"signals_detected":{"additionalProperties":{"type":"string"},"description":"Content signals detected (e.g. og:type=article).","type":"object"},"suggestions":{"description":"Schema additions suggested for this page.","items":{"additionalProperties":false,"properties":{"ready_to_paste":{"description":"JSON-LD block ready to paste into <head>. Fields marked FILL: need manual completion.","type":"string"},"signal":{"description":"Content signal that triggered this suggestion.","type":"string"},"type":{"description":"Schema @type being suggested.","type":"string"}},"required":["type","signal","ready_to_paste"],"type":"object"},"type":"array"},"summary":{"additionalProperties":false,"properties":{"signals_detected":{"type":"number"},"suggestions_count":{"type":"number"},"types_present":{"type":"number"}},"required":["types_present","signals_detected","suggestions_count"],"type":"object"},"url":{"description":"URL that was inspected.","type":"string"}},"required":["url","fetched_at","schema_types_present","signals_detected","suggestions","summary"],"type":"object"}}]}}}
