Shruwd
v0.1.16Set up a brand, read its AI-search visibility, and act on diagnostic findings.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
shruwd_get_workspace Get workspace
The plan, the entitlements in force (brands, the workspace-wide prompt pool, members, engines, cadence, history window, rechecks per month, and maxVisibleFindings — how many findings the plan shows in full), usage against the period allowance including activePrompts against promptsAllowance, whether the caller is the workspace owner or a member, and the brands the caller can reach with their role on each. Call this first: the role on a brand decides which of these tools are allowed on it. Usage is the whole workspace's, since the pools are shared.
shruwd_list_brands List brands
The active brands the caller can reach, with their prompt and competitor counts and the caller's role on each.
shruwd_get_brand Get brand
One brand with its pipeline health: last successful cycle, next scheduled cycle, run success rate, log-ingest continuity and connection states. Check this before treating a flat metric as a signal — "nothing ran" and "nothing was mentioned" look identical in a chart.
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
shruwd_create_brand Create brand
Creates a brand, its self entity (one alias = the name, one domain = the registrable domain) and the first measurement cycle. If the account has no workspace yet, one is created on the free tier. The response says which engines the plan measures and whether a first cycle was planted. On the free tier "snapshot" is "planned" or "already_taken": a domain gets one free measurement ever, across all accounts. Add competitors first (shruwd_add_competitor), then every prompt in one shruwd_add_prompts call: the first cycle starts within minutes of the first prompts and measures only the prompts and co…
| Parameter | Type | Description |
|---|---|---|
domain * | string | Host or URL; reduced to the registrable domain (www.x.com/p → x.com). |
name * | string | |
contextTerms | array | When given, a mention counts only if one of these words appears near it. REQUIRED for names of six characters or fewer and for common English words; the API refuses such names without them. |
timezone | string | IANA zone for day boundaries. Defaults to UTC. |
shruwd_update_brand Update brand
Renames a brand or changes its timezone. The name is for display; matching uses the self entity's aliases (shruwd_set_entity). The timezone moves the day boundary for cycles and rollups from the next cycle on. The domain cannot change: it defines the self entity, so a new domain is a new brand.
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
name | string | |
timezone | string | IANA zone. |
shruwd_archive_brand Archive brand
Archives a brand. Nothing is deleted; scheduling stops and history stays. Requires the workspace owner: a key held by a member is refused with 403 insufficient_role. Ask before using this.
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
shruwd_list_prompts List prompts
The brand's prompts. With an engine, each prompt carries its coverage over the window: how often the brand was mentioned in answers to it. Per-prompt n is small (three repetitions per cycle), so coverage is often insufficient_data; that is correct, not missing data. engine "all" gives each prompt its coverage on every engine under "byEngine": where a question is lost on one engine and not the others.
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
engine | string | all = every engine the brand measures, in one call; google_aio = Google AI Overviews; google_ai_mode = Google AI Mode; chatgpt = ChatGPT; gemini = Gemini; perplexity = Perplexity, asked through its So… |
from | string | |
includeInactive | boolean | |
to | string |
shruwd_add_prompts Add prompts
Adds prompts — the questions asked of each engine every cycle. Write them the way a buyer would type them, without the brand name unless the intent is navigational. 1–500 characters each. The batch is atomic: if it would exceed the plan's prompt allowance — one pool shared across every brand in the workspace, not a per-brand limit — nothing is added and the error carries limit, current and submitted. On a new brand the first measurement starts within minutes of the first prompts and covers only what exists then, so add its competitors before this and every prompt in one call. Prompts f…
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
prompts * | array |
shruwd_update_prompt Update prompt
Edits a prompt by its promptGroupId. Changing text or intent creates a new version under the same group — history stays attached to the version that produced it. tags, active and page change in place. Reactivating counts against the plan limit. page is the page on the brand's own site that should answer the question: when a finding on a prompt has recommendation.target null, or names the wrong page, set it here (the finding's subjectRef is the promptGroupId). Findings name it from the next measurement, not at once.
| Parameter | Type | Description |
|---|---|---|
promptGroupId * | string | |
active | boolean | |
intent | string | Why someone asks the prompt. informational = learning about a topic; comparison = weighing named options; commercial = choosing what to buy; navigational = looking for a specific site; problem = fixin… |
page | The page on the brand's own site that should answer this question, as a full URL on one of its own domains. Findings about the question name it. null clears it. | |
tags | array | |
text | string |
shruwd_remove_prompt Remove prompt
Deactivates a prompt. Nothing is deleted; its history stays readable.
| Parameter | Type | Description |
|---|---|---|
promptGroupId * | string |
shruwd_list_entities List entities
The brand itself (isSelf) and every competitor, each with the exact aliases, domains, YouTube channels, exclusions and context terms that decide what counts as a mention or a citation.
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
shruwd_add_competitor Add competitor
Adds a competitor. Matching is exact, on word boundaries — no fuzzy matching, ever — because a false positive silently corrupts every metric. That is also why a short name or alias (six characters or fewer) or a common English word ("Arc", "Linear", "Notion") is refused without contextTerms: those names appear in sentences that are not about the company. Give one or two category words as context terms ("project management", "crm") and the mention counts only when one appears nearby. Include the competitor's domain so citations of it are attributed, and its YouTube channel if it has one so…
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
name * | string | |
aliases | array | Exact strings only. When adding, the name is always matched: list only its other spellings. When setting, the complete list wanted, the name included; omitted, it is the name alone. |
channels | array | YouTube channels the company publishes on, as the channel URL YouTube shows (https://www.youtube.com/@name) or the @handle. A cited video on one counts for this entity. Optional; when setting, omit it… |
contextTerms | array | When given, a mention counts only if one of these words appears near it. REQUIRED for names of six characters or fewer and for common English words; the API refuses such names without them. |
domains | array | Hosts or URLs; reduced to registrable domains. A citation of one counts for this entity. |
exclusions | array | Literal phrases that contain an alias but are not the entity ("arc welding" for "Arc"). |
shruwd_set_entity Set entity configuration
Sets the DESIRED aliases, domains, exclusions and context terms of an entity (the brand's own self entity included). Send the full lists: what is missing is closed as of now, what is new is added, what is unchanged is untouched, and past measurements keep the aliases that were valid when they ran. YouTube channels are the exception: omitted, they stay as they are. Read shruwd_list_entities first.
| Parameter | Type | Description |
|---|---|---|
entityId * | string | |
aliases | array | Exact strings only. When adding, the name is always matched: list only its other spellings. When setting, the complete list wanted, the name included; omitted, it is the name alone. |
channels | array | YouTube channels the company publishes on, as the channel URL YouTube shows (https://www.youtube.com/@name) or the @handle. A cited video on one counts for this entity. Optional; when setting, omit it… |
contextTerms | array | When given, a mention counts only if one of these words appears near it. REQUIRED for names of six characters or fewer and for common English words; the API refuses such names without them. |
domains | array | Hosts or URLs; reduced to registrable domains. A citation of one counts for this entity. |
exclusions | array | Literal phrases that contain an alias but are not the entity ("arc welding" for "Arc"). |
shruwd_remove_entity Remove competitor
Closes a competitor as of now. The brand's own entity cannot be removed.
| Parameter | Type | Description |
|---|---|---|
entityId * | string |
shruwd_list_suggestions List competitor suggestions
Names the AI answers use that the brand does not track yet — the products a person would recognise as competitors but never added. Each comes with the share of answers that named it (e.g. 0.34 = in 34% of a prompt cluster's responses) and, when the answers linked it, its domain. Review them with the user: accept the real competitors (they then count in share of voice), dismiss the rest. Suggestions appear only after a measurement cycle has closed.
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
state | string |
shruwd_accept_suggestion Accept a suggestion as a competitor
Turns a suggestion into a tracked competitor, with exactly the rules of shruwd_add_competitor: exact aliases only, and a short or common-word name or alias is refused until contextTerms are given. The name and the linked domain are prefilled from the suggestion; pass aliases, domains, exclusions or contextTerms to adjust. Confirm with the user before accepting.
| Parameter | Type | Description |
|---|---|---|
suggestionId * | string | |
aliases | array | Exact strings only. When adding, the name is always matched: list only its other spellings. When setting, the complete list wanted, the name included; omitted, it is the name alone. |
channels | array | YouTube channels the company publishes on, as the channel URL YouTube shows (https://www.youtube.com/@name) or the @handle. A cited video on one counts for this entity. Optional; when setting, omit it… |
contextTerms | array | When given, a mention counts only if one of these words appears near it. REQUIRED for names of six characters or fewer and for common English words; the API refuses such names without them. |
domains | array | Hosts or URLs; reduced to registrable domains. A citation of one counts for this entity. |
exclusions | array | Literal phrases that contain an alias but are not the entity ("arc welding" for "Arc"). |
name | string | Override the suggested name. |
shruwd_dismiss_suggestion Dismiss a suggestion
Not a competitor. Quiet for ninety days; suggested again only if the answers still name it.
| Parameter | Type | Description |
|---|---|---|
suggestionId * | string |
shruwd_run_measurement Run a measurement
Schedules a measurement cycle now: every active prompt, on every entitled engine, repeated as the plan sets (three times on weekly plans, once for the free snapshot). It starts at once and completes over the following day; this response contains only the cycle id. Watch it with shruwd_list_cycles, then read shruwd_get_visibility and shruwd_list_findings. A cycle spends the period's run allowance (see shruwd_get_workspace); weekly plans already run one per week, so use this after a change worth measuring. Do not call it to start a new brand: shruwd_create_brand plants the first measurement, and…
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
shruwd_list_cycles List cycles
Recent measurement cycles, newest first, with state (pending, running, complete, partial, failed, skipped_quota) and run counts. "partial" means some runs failed; "skipped_quota" means the allowance, the plan or billing stopped it. On a weekly plan the newest is next week's cycle, still pending: the newest that is not pending is the current measurement, and its results are in once it is complete or partial.
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
limit | integer |
shruwd_get_visibility Get visibility
Mention rate and share of voice for the brand and each competitor on one engine over a window (default: last 30 days), plus per-prompt coverage. Each metric is {state: "ok", point, lo, hi, n} — a proportion with its 95% interval — or {state: "insufficient_data"} when fewer than ten responses exist, or {state: "undefined"}. A metric with state insufficient_data is NOT zero; do not report it as a number, and do not compare two metrics whose intervals overlap as if one were higher. "asOf" is the day the numbers describe. "historyFrom" is set when the window was clamped to the plan's history.…
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
engine | string | all = every engine the brand measures, in one call; google_aio = Google AI Overviews; google_ai_mode = Google AI Mode; chatgpt = ChatGPT; gemini = Gemini; perplexity = Perplexity, asked through its So… |
from | string | |
to | string |
shruwd_get_visibility_series Get visibility over time
The window metric at every cycle close in a range (default: the last ninety days, 30-day window): for the brand and each competitor, mention rate and share of voice per close, each a {state: "ok", point, lo, hi, n} metric or an explicit non-number. Use it to answer "is this changing" — but two points whose intervals overlap have NOT moved, and a change across a "modelChanges" entry may be the provider's model rather than the brand (the comparison is confounded). "series" is index-aligned with "points"; null means no rollup row for that close. engine: "all" returns the mention rate across eng…
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
engine | string | all = every engine the brand measures, in one call; google_aio = Google AI Overviews; google_ai_mode = Google AI Mode; chatgpt = ChatGPT; gemini = Gemini; perplexity = Perplexity, asked through its So… |
from | string | |
to | string | |
window | number | The rolling window in days that each point describes. Defaults to 30. |
shruwd_get_crawlers Get crawler activity
Which AI crawlers fetched the brand's site, from its server logs, over a window. verifiedHits were confirmed against the vendor's published IP ranges; unverifiedHits merely claimed the user-agent, which anyone can send. Only verified hits are a signal, and the two are never summed. "live_retrieval" bots fetch pages to answer a question now, so a page they cannot fetch cannot be cited in those answers; "training" crawlers collect pages for model training. "coverage" says whether log ingest has been continuous — if not, an absence of hits means nothing.
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
from | string | |
to | string |
shruwd_list_crawler_pages List the pages AI crawlers read most
Which pages of the brand's site AI crawlers fetched most, every bot on a page added up, verified hits only. liveRetrievalHits are fetches for answers being written now (a ChatGPT-User fetch means someone's question pulled that page); trainingHits are crawls for model training, which tend to sweep every page evenly, so they say little about which pages matter. Ordered by live retrieval, then training; purpose "training" orders by training instead. bots says which bots fetched each page. Pass contentOnly to drop files, framework data and sign-in pages. A page fetched is not a page cited: shruwd_…
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
contentOnly | boolean | Only pages a person reads (contentPage true). |
from | string | |
limit | integer | How many pages. Defaults to 50. |
purpose | string | Only pages this kind of crawler fetched, ordered by its hits. |
to | string |
shruwd_list_crawler_paths List crawler activity per path
Which paths each AI crawler fetched and what it got, one row per bot and path, verified hits only. Use status "error" to find where the errors in shruwd_get_crawlers came from. Read contentPage before calling an error a problem: it is false for files and framework data (_payload.json, scripts, images, feeds) and for sign-in and account pages, and a framework data file can 404 to everyone by design. worstStatus tells a missing page (404) from a refusal (403). totalPaths above the rows returned means the list was cut. Per-path detail is kept 90 days.
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
bot | string | Only this bot: a botId from shruwd_get_crawlers, such as oai_searchbot. |
contentOnly | boolean | Only pages a person reads (contentPage true). |
from | string | |
limit | integer | How many rows. Defaults to 50. |
status | string | Only paths that got this answer, most often first. error = 4xx or 5xx. |
to | string |
shruwd_list_sources List the sources the answers cite
Which sites and pages the AI answers cite, and whose they are: one row per domain, most-cited first, with its most-cited pages. Use it to see what the engines read for the brand's questions, or for one question (pass a promptGroupId, or a finding's subjectRef). kind says whose a domain is: yours, a competitor's, or a third party (review_directory, forum, wikipedia, video, editorial). rate is the share of answers citing it with its 95% interval; state insufficient_data is not zero, never report it as a number. answers.citingAny is how many answers cite anything at all: where few do (ChatGPT oft…
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
engine | string | Only this engine's answers. google_aio = Google AI Overviews; google_ai_mode = Google AI Mode; chatgpt = ChatGPT; gemini = Gemini; perplexity = Perplexity (its Sonar API). |
from | string | |
limit | integer | How many sources. Defaults to 25. |
promptGroupId | string | Only the answers to this prompt: a promptGroupId from shruwd_list_prompts, or a finding's subjectRef. |
to | string |
shruwd_list_findings List findings
Diagnoses, ordered by severity, then confidence, then estimated impact. Each has a specific recommendation: what to change, where, and which metric should move. confidence: "observed" was measured from first-party data; "inferred" follows a reliable pattern; "heuristic" is a plausible cause that could not be confirmed — treat it as a hypothesis, not a fact. By default the open, acknowledged, fix_applied and rechecking findings; pass states to change that. "queued" counts open findings held back by the weekly cap. On plans that cap visible findings, "locked" counts the rest by severity: they…
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
includeSuppressed | boolean | Also return held findings: suppressed because a more fundamental finding explains them, or waiting while another fix on the same question is measured (suppressedReason). |
states | array |
shruwd_suggest_setup Suggest prompts and competitors
Reads the brand's homepage and sitemap and drafts prompts (10 to 25, as many as the workspace's prompt pool has room for), each with the page on the brand's site that should answer it or null, and up to six competitors. Nothing is saved to the brand: show the draft to the user, then add each competitor they confirm with shruwd_add_competitor, passing its aliases and contextTerms from the draft, and after that the prompts they keep, with their page, in one shruwd_add_prompts call. Returns the stored draft when one exists unless regenerate is true. Three drafts per brand per day; a new draft can…
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
regenerate | boolean | Replace the stored draft with a new one. |
shruwd_list_answers List latest answers
The latest individual AI answers for the brand, newest first: the prompt, the engine, whether the brand was named and at what rank, the competitors named and the pages cited. Evidence, not a metric: never compute a rate from these; use shruwd_get_visibility, which withholds numbers below ten answers. To read the answers behind a finding on a prompt, pass its subjectRef as promptGroupId.
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
engine | string | Only this engine's answers. google_aio = Google AI Overviews; google_ai_mode = Google AI Mode; chatgpt = ChatGPT; gemini = Gemini; perplexity = Perplexity (its Sonar API). |
limit | integer | How many answers. Defaults to 10. |
promptGroupId | string | Only this prompt's answers: a promptGroupId from shruwd_list_prompts, or a finding's subjectRef. |
shruwd_get_finding Get finding
One finding with its full evidence, recommendation, and the history of state changes. A finding the plan does not show in full — one counted in a findings list's "locked" — is refused with 403 not_entitled: it exists, the plan withholds it.
| Parameter | Type | Description |
|---|---|---|
findingId * | string | Finding id, or its number — the one shown in the dashboard and in its URL. |
shruwd_transition_finding Transition finding
Moves a finding: "acknowledged" (seen), "fix_applied" (the recommended change is live), or "dismissed". Order matters: an open finding must be acknowledged before fix_applied, or the call is refused with 409 invalid_transition. fix_applied captures a baseline of the affected prompts and starts the wait: 14 days, 30 for a listing on someone else's page (the gatekeeper and competitor findings), and a fix to a page of the brand's own site also waits until the change is live and, with Search Console connected, Google has re-read the page. A recheck then measures again, and the finding becomes "res…
| Parameter | Type | Description |
|---|---|---|
findingId * | string | Finding id, or its number — the one shown in the dashboard and in its URL. |
to * | string | |
note | string | What was done, for the record. |
shruwd_create_ingest_token Create log-drain token
Mints the token the brand's server sends its access logs with, and returns the endpoint to POST them to plus a `setup` object with three routes: an HTTP log drain (Vercel on Pro or Enterprise, Netlify on Enterprise, Fly), a Cloudflare Logpush HTTP destination (Enterprise zones; the destinationUrl embeds the token), or the reference forwarder Worker (any other Cloudflare plan or CDN-served site). The token is shown once and never again; previous tokens are revoked. Ask which platform the site runs on, then give the user that route's values verbatim. Logs power the crawler view and the highest-c…
| Parameter | Type | Description |
|---|---|---|
brandId * | string | Brand id or slug, from shruwd_get_workspace, shruwd_list_brands or shruwd_create_brand. The slug is the segment in the dashboard URL (/brands/{slug}). |
label | string |