Skip to content
Open the app

The runtime's MCP tools ​

The Kadmo runtime's MCP server exposes 30 tools, listed here from the runtime's own tool registry. Tools marked read-only never change the page, an input or a workflow. Installed plugins add their own tools next to these. The tools of the Kadmo app's hosted MCP server are on MCP tools.

Register the server with your client first: see The MCP server. The browser tools need the Kadmo extension connected to the runtime (check with get_browser_status); how snapshots, refs and selectors work is on Browser tools. The workflow, run-log and artifact tools need no browser.

Workflow and run-log tools ​

Run the workflows the runtime has installed and read their results. They need no browser.

run_workflow ​

Run Workflow

Execute a workflow automation by ID. Returns a run_id for tracking execution status.

ParameterTypeRequiredDescription
workflow_idstringYesUnique identifier of the workflow
paramsobjectNoKey-value parameters required by the workflow

get_workflow ​

Get Workflow · read-only

Get detailed information about a specific workflow.

ParameterTypeRequiredDescription
workflow_idstringYesUnique identifier of the workflow

list_workflows ​

List Workflows · read-only

List all available workflow automations.

ParameterTypeRequiredDescription
sourcestringNoFilter by source Values: all, actions, workflows.

get_run_log ​

Get Run Log · read-only

Retrieve the execution log for a completed workflow run.

ParameterTypeRequiredDescription
run_idstringYesThe run ID returned from run_workflow

list_run_logs ​

List Run Logs · read-only

List recent workflow execution logs.

ParameterTypeRequiredDescription
limitnumberNoMaximum number of logs to return
workflow_idstringNoFilter logs by workflow ID

Artifact tool ​

Upload a file from a job a Kadmo agent is working on. It needs no browser.

publish_artifact ​

Publish Artifact

Publish a piece of evidence (a screenshot, a design mockup, an RCA/coverage report) to the portal RIGHT NOW, mid-session, and get back a paste-ready snippet to cite in your ONE resolution comment on the ticket. The file is uploaded, attached to the ticket automatically, and given a tokenized no-login download link — the snippet contains that link (a portal issue gets a markdown link to the file). A report attached to a ticket is numbered and named by the portal (<KEY>_<playbook>_<step>_<NN>), and its snippet leads with a Report: #NN <link> line to paste as it is. Use this the moment you have evidence worth showing, instead of waiting for the end of the session (nothing you save after your comment is written can be cited in it). Works on a dispatched job and for every turn of a live app editing session; on a ticketless/chat job it returns a download link only. Files must be ≤ 25 MB and live under your home directory. On any failure the file is left on disk and still uploads at session end, so save deliverables under artifacts/ as a fallback.

Agents only

The text above is what the runtime sends to an agent's model. publish_artifact works on a Kadmo agent that is working on a job: it needs the job's context (~/.kadmo/job-context.json or a live app session) and the agent's credentials (KADMO_AGENT_TOKEN or AGENT_TOKEN, and AGENT_NAME). On your own computer it answers with an error that names what is missing.

ParameterTypeRequiredDescription
pathstringYesPath to the file to publish. A relative path resolves against your workspace (~/workspace); an absolute path is also accepted, as long as it stays within your home directory.
kindstringNoGallery category. Optional — inferred from the file extension when omitted (images → screenshot, .svg/.html → mock, .pdf/.md/.txt/.csv/.json → report, .mp4/.webm → video). Values: screenshot, mock, report, video.
captionstringNoOptional short label for the snippet. Shown only in the returned snippet as a hint for your comment; it is NOT stored on the artifact.

Report tool ​

Hand a job's report over to the Kadmo app, ask a person a question, or hand them a draft to release. It needs no browser.

publish_report ​

Publish Report

Hand your step report over to the portal as the LAST action of a dispatched job, instead of posting the ticket comment yourself. The portal records the verdict on the step (the playbook gate reads it from there), writes the ticket comment from your report in the account's report shape — a readable comment, a short summary with the report attached as a numbered file, both, or nothing at all on the quiet shape — translates it when a report language is set, and edits the comment of an earlier call in the same step instead of posting again. Publish evidence with publish_artifact first and pass its links as evidence. Every failure is non-fatal: the result then tells you to post your ONE comment yourself. To ask a person, add up to 3 question parts in parts and declare the verdict your workflow has for it; then END YOUR SESSION after this call — the answers continue it (or start the workflow again with them in its hint). The result names the questions recorded; when it names none, nothing was asked. To hand a person a draft to correct and release or reject (an order, say), pass ONE draft part instead of questions — never both — written by your script to a JSON file and passed as parts_file, so no value is retyped; then END YOUR SESSION after this call. The release or reject continues it, and its hint names the one request that saves the answer and the corrected draft as JSON. The result names the draft recorded.

Agents only

The text above is what the runtime sends to an agent's model. publish_report works on a Kadmo agent that is working on a job, with the same job context and credentials as publish_artifact. On your own computer it answers with an error that names what is missing.

ParameterTypeRequiredDescription
verdictstringYesThe step verdict token, one of the workflow's verdicts (e.g. PR_OPEN, WORK_CONTINUE, BLOCKED, PASS, FAIL). Only the token — never a sentence.
summarystringYesOne or two sentences: what the step did and where it stands (at most 2,000 characters).
bodystringYesThe full report in Markdown — the sections your workflow asks for (what changed, how to verify, the handoff checklist, the findings). No closing verdict line: the portal adds it.
evidencearrayNoLinks that evidence the report: the PR, the download links publish_artifact returned (at most 20). Each is { label?, url }.
filenamestringNoOptional name for the report file (Markdown); the portal numbers it on the ticket when it attaches it.
partsarrayNoOptional parts of the report (kadmo.report.parts.v1). The portal reads the question part (at most 3 a report) and the draft part (at most one, never beside questions, at most 1 MiB as JSON). Another part type is dropped with a warning. A malformed part refuses the report, naming the place: correct it and call again.
parts_filestringNoInstead of parts: a JSON file holding the parts array, under your home (a relative path is under ~/workspace), at most 2 MiB. Use it for a draft your script built: it is sent exactly as written.

How a workflow asks ​

A job that cannot go on without a person's answer asks in its report and stops. Each question is a part of type question:

FieldRequiredLimitWhat
idYes1 to 32 characters of A-Z a-z 0-9 _ . -, unique in the reportWhat the answer names
textYes600 charactersThe question: what the job needs and why
toNo200 charactersWhom it is for: requester (the default), or a person's name or address
choicesNo3Answers to pick from: a label of at most 30 characters, a value of at most 100 (the label when absent), and recommended: true on at most one
otherNo—Whether an answer in the person's own words is welcome: true by default when there are no choices, else false. A question with no choices must welcome one
json
{
  "verdict": "NEEDS_ANSWER",
  "summary": "Order 4711: 5 of 6 lines are ready. Line 2 needs you.",
  "body": "## Lines\n\n…",
  "parts": [
    {
      "type": "question",
      "id": "q1",
      "text": "Line 2 names two article numbers, 5512 and 5521. Which one is meant?",
      "choices": [
        { "label": "5521, as described", "value": "5521", "recommended": true },
        { "label": "5512, as in the column", "value": "5512" }
      ],
      "other": true
    }
  ]
}
  • At most 3 questions a report. A question over a limit refuses the whole report, with the part named; nothing is recorded, so correct it and call again. A part of another type is dropped with a warning, and the report is recorded.
  • The verdict is the workflow's. Declare a verdict for a report that asks (here NEEDS_ANSWER) in the workflow's verdicts, as for any other.
  • End the session after the call. The result says Questions recorded: 1 (q1).; when it names no questions, nobody was asked (an app that does not take questions yet), so say in the report what you need instead.
  • A second report in the same step replaces its open questions; an answered one stands.
  • The answers come back once every question of the job is answered, in the job's page or another channel: they continue the job's session as its hint, or, when the session cannot be continued, start the workflow again with the questions and answers in its hint. A workflow reads its hint before it starts over.

How a workflow hands over a draft ​

When the job's result is something a person corrects and releases — an order to enter, say — the report hands it over as a draft and the job stops. The person sees every value, with the unclear ones marked, changes what needs changing and releases it, or rejects it. Only then does the job go on, with exactly the person's values. The agent needs the Kadmo Agent Runtime 0.7.0 or later.

A report carries one part of type draft, never beside questions:

FieldRequiredLimitWhat
idYesAs a question'sWhat the answer names
titleYes150 charactersWhat the person reads first
fieldsNo40The header: a key, a label, a value, a kind (text, number, date or choice), editable (false unless given), a mark (ok, check, missing or changed) with a reason for every mark but ok, and candidates to pick from (a label and a value, at most 10)
columnsWith lines12The lines' columns: a key, a label, a kind and editable, the default of each line's cell
linesNo200A key, a mark and its reason, and cells keyed by column: a bare value, or an object with the same value, editable, mark, reason and candidates a field has
totalsNo12As the workflow computed them, read only: a key, a label and a value
notesNo20Notes that bind, read only, at most 600 characters each
actionsYes2release, reject or both, each with the label the person reads (at most 30 characters)

Every value is a string or null, one line, at most 200 characters: a number as 60 or 12.5 (never 60,000), a date as YYYY-MM-DD, a choice one of its candidates' values. A draft needs fields or lines, and is at most 1 MiB as JSON.

json
[
  {
    "type": "draft",
    "id": "order",
    "title": "Order 4711 from Muster Industriebedarf GmbH",
    "fields": [
      {
        "key": "customer", "label": "Customer", "kind": "choice", "editable": true, "value": "C-100",
        "mark": "check", "reason": "Two customers match",
        "candidates": [
          { "label": "Muster Industriebedarf GmbH, Musterstadt", "value": "C-100" },
          { "label": "Muster Industriebedarf GmbH, Beispielhausen", "value": "C-200" }
        ]
      },
      { "key": "delivery_date", "label": "Delivery date", "kind": "date", "editable": true, "mark": "missing", "reason": "No delivery date in the order" }
    ],
    "columns": [
      { "key": "article", "label": "Article", "editable": true },
      { "key": "quantity", "label": "Quantity", "kind": "number", "editable": true },
      { "key": "price", "label": "Price", "kind": "number" }
    ],
    "lines": [
      { "key": "l1", "cells": { "article": "ART-1001", "quantity": "10", "price": "12.5" } },
      { "key": "l2", "mark": "check", "reason": "Two articles match", "cells": { "article": "ART-1002", "quantity": "2", "price": "4" } }
    ],
    "totals": [{ "key": "net", "label": "Net", "value": "133" }],
    "notes": ["Prices are binding fixed prices."],
    "actions": [{ "action": "release", "label": "Release" }, { "action": "reject", "label": "Reject" }]
  }
]
  • Write it to a file. The workflow's script builds the draft and writes the parts array to a JSON file; the call passes it as parts_file. A model never retypes a value the script computed.
  • A malformed draft refuses the report, naming the place (parts[0] (draft "order"): lines[1].cells.quantity: …); nothing is recorded, so correct it and call again.
  • End the session after the call. The result says Draft recorded (order).; when it names no draft, nobody can release it (an app that does not take drafts yet), so say in the report what you need instead.
  • A second report in the same step replaces an open draft; corrections given back earlier are kept only while the draft is the same.
  • The answer comes back once the person releases or rejects the draft: it continues the job's session, or, when the session cannot be continued, starts the workflow again. Either way the hint names one request that saves the answer to draft-<id>.json with the agent's own token. No value the person typed is ever in the prompt.

The file holds the answer, the report that handed the draft over, and the draft with the person's values in place: each place they changed reads "mark": "changed" with what it was, and changes lists every change.

json
{
  "id": 812,
  "part_id": "order",
  "job_id": 27431,
  "answer": {
    "action": "release",
    "by": "Ada Example",
    "via": "outlook",
    "at": "2026-11-30 11:00:00",
    "reason": null,
    "changes": [
      { "place": "fields.customer", "label": "Customer", "from": "C-100", "to": "C-200" },
      { "place": "fields.delivery_date", "label": "Delivery date", "from": null, "to": "2026-12-15" },
      { "place": "lines.l2.quantity", "label": "Quantity (line l2)", "from": "2", "to": "3" }
    ]
  },
  "report": { "verdict": "NEEDS_ANSWER", "summary": "Order 4711: a draft of 2 lines; 2 places need you." },
  "draft": { "id": "order", "title": "Order 4711 from Muster Industriebedarf GmbH", "fields": ["…"], "lines": ["…"] }
}

A reject carries the person's reason and no changes. Only the agent running the job that the answer continued can read the file; every other caller gets 404.

Browser session tools ​

The connection to the Kadmo extension, a whole-page capture and HTTP sign-in for the driven tab.

get_browser_status ​

Get Browser Status · read-only

Check if the browser extension is connected.

No parameters.

capture_page ​

Capture Page Selectors · read-only

Capture selectors and interactive elements from the current page.

No parameters.

set_basic_auth ​

Set HTTP Basic Auth

Provide HTTP Basic Auth credentials so the browser logs in silently instead of showing the native username/password modal, which would otherwise block the page and hang automation. Applies to the connected tab. Omit "origin" to use the credentials for any site that challenges; pass "origin" (e.g. https://staging.example.com) to scope them to one site. When a challenge has no matching credentials it is dismissed so the page never hangs.

ParameterTypeRequiredDescription
usernamestringYesBasic Auth username.
passwordstringYesBasic Auth password.
originstringNoOptional origin to scope the credentials to (e.g. https://staging.example.com). Omit to apply to any challenged site.

clear_basic_auth ​

Clear HTTP Basic Auth

Remove stored HTTP Basic Auth credentials. Omit "origin" to clear all stored credentials; pass "origin" to clear just that site.

ParameterTypeRequiredDescription
originstringNoOptional origin to clear (e.g. https://staging.example.com). Omit to clear all stored credentials.

Move around and read the page without changing it.

Navigate Browser

Navigate the connected browser tab to a URL.

ParameterTypeRequiredDescription
urlstringYesThe URL to navigate to

snapshot ​

Accessibility Snapshot · read-only

Capture accessibility snapshot of the current page. Returns YAML with element refs for use with click/type. Use includeContent=true to also include visible text content as markdown. Note: taking a snapshot may dismiss inline modals or popups — use screenshot instead if you need to verify modal content.

ParameterTypeRequiredDescription
includeContentbooleanNoInclude visible text content in the snapshot as markdown (default: false). Useful for reading articles, documentation, or any page content.

exists ​

Check Element Exists · read-only

Check if an element exists on the page. Returns true/false without throwing. Useful for conditional logic.

ParameterTypeRequiredDescription
selectorstringYesCSS selector to check.
timeoutnumberNoHow long to wait before returning false, in milliseconds (default: 2000).

wait ​

Wait for Element · read-only

Wait for an element to appear on the page. Blocks until the element matching the selector exists in the DOM, or throws after timeout.

ParameterTypeRequiredDescription
selectorstringYesCSS selector to wait for.
timeoutnumberNoMaximum wait time in milliseconds (default: 5000).

extract ​

Extract Element Text · read-only

Extract text content from an element.

ParameterTypeRequiredDescription
selectorstringYesCSS selector for the element.

extract_all ​

Extract All Matching · read-only

Extract text from all elements matching a selector, joined by a separator. Useful for getting lists of items, table columns, or repeated elements.

ParameterTypeRequiredDescription
selectorstringYesCSS selector matching multiple elements.
separatorstringNoString to join results with (default: "\n").
attributestringNoOptional attribute to extract instead of text content (e.g., "href", "src").

extract_map ​

Extract Structured Data · read-only

Extract structured data from repeated elements. For each element matching the outer selector, extracts named fields using sub-selectors. Returns JSON array of objects.

ParameterTypeRequiredDescription
selectorstringYesCSS selector for the repeating container elements (e.g., "table tbody tr", ".card").
fieldsobjectYesMap of field names to extraction rules. Each rule has a "selector" (relative CSS selector) and optional "attribute".

screenshot ​

Take Screenshot

Capture a screenshot of the current page. Prefer cropping to a specific area instead of capturing the full viewport — use ref (from snapshot), selector (CSS), or region (manual rect) to save context tokens. Full viewport is fine for first visit to a new page; after that, crop to the relevant section. Pass path to write the PNG to a file instead of returning image bytes — that is what you want for docs screenshots and QA evidence, since the file can then be published with publish_artifact and never enters your context.

ParameterTypeRequiredDescription
refnumberNoElement reference from snapshot (the number after ref=). Crops screenshot to that element with padding.
selectorstringNoCSS selector for the element. Crops screenshot to that element with padding.
regionobjectNoManual crop region in CSS pixels (viewport coordinates).
pathstringNoWrite the PNG here instead of returning image bytes; returns the path and byte count as text. Accepts ~/... or an absolute path; a relative path resolves against ~/workspace. Must stay inside the home directory. Parent directories are created, and an existing file is overwritten.

Interaction tools ​

Act on the page: click, type, select, scroll, and run a batch of steps.

click ​

Click Element

Click an element on the page.

ParameterTypeRequiredDescription
selectorstringNoCSS selector for the element. Supports :has-text("text") pseudo-selector.
refnumberNoElement reference from snapshot (the number after ref=).
elementstringNoHuman-readable element description (for logging).

type ​

Type Text

Type text into an input element.

ParameterTypeRequiredDescription
selectorstringNoCSS selector for the input element.
refnumberNoElement reference from snapshot.
elementstringNoHuman-readable element description.
textstringYesText to type.
submitbooleanNoPress Enter after typing (default: false).

fill ​

Fill Form Field

Fill a form field by setting its value programmatically. Unlike "type" (which simulates keystrokes), "fill" sets the value directly and triggers React/Vue/Angular change events. Use this for framework-controlled inputs where "type" doesn't work.

ParameterTypeRequiredDescription
selectorstringYesCSS selector for the input element.
valuestringYesValue to set on the input.

press_key ​

Press Key

Press a key on the keyboard. Use this for keyboard shortcuts, Tab navigation, Enter, Escape, arrow keys, etc. Supports key combinations like "Ctrl+A" or "Shift+Tab".

ParameterTypeRequiredDescription
keystringYesKey to press. Examples: "Tab", "Enter", "Escape", "ArrowDown", "Backspace", "Shift+Tab", "Ctrl+A". For single characters, use the character directly (e.g., "a").
selectorstringNoOptional CSS selector to focus before pressing the key.
refnumberNoOptional element reference from snapshot to focus before pressing the key.

select_option ​

Select Dropdown Option

Select an option from a native <select> dropdown element. Use this instead of click for <select> elements, as native dropdowns cannot be controlled via click events.

ParameterTypeRequiredDescription
selectorstringNoCSS selector for the <select> element.
refnumberNoElement reference from snapshot (the number after ref=).
elementstringNoHuman-readable element description (for logging).
valuestringNoThe option value to select (matches <option value="...">).
labelstringNoThe visible text of the option to select (matches <option> text content).

hover ​

Hover Element

Hover over an element (positions cursor for scroll targeting).

ParameterTypeRequiredDescription
selectorstringYesCSS selector for the element.

scroll ​

Scroll Page

Scroll the page.

ParameterTypeRequiredDescription
directionstringYesScroll direction. Values: up, down, left, right.
amountnumberNoScroll amount in pixels (default: 300).

scroll_into_view ​

Scroll Element Into View

Scroll a specific element into the viewport. More precise than "scroll" — targets an exact element.

ParameterTypeRequiredDescription
selectorstringYesCSS selector for the element to scroll into view.
blockstringNoVertical alignment in viewport (default: "center"). Values: start, center, end, nearest.

inject_css ​

Inject CSS

Inject a CSS rule into the current page. The main use is pre-capture redaction: blur or hide sensitive elements, then screenshot to a file, so no unredacted image ever exists. Pass an id to make the injection replaceable — injecting the same id again swaps the rule rather than stacking a second one.

ParameterTypeRequiredDescription
cssstringYesCSS to inject, e.g. ".user-email { filter: blur(6px); }"
idstringNoOptional identifier for the injected style element, so it can be replaced or removed later.

evaluate ​

Evaluate JavaScript

Execute JavaScript in the browser page context and return the result. Useful for reading page state, checking values, or performing calculations.

ParameterTypeRequiredDescription
jsstringYesJavaScript code to evaluate in the page context.

browser_batch ​

Batch Browser Actions

Run a SEQUENCE of browser actions in ONE call instead of one round trip per action. Each step is the same shape you would pass to the individual tool, plus a "cmd" field naming which tool to run.

A batch is a DETERMINISTIC run: actions you already know the selectors for, executed top to bottom, halting at the first failure (unless on_error:"continue"). By default it ends by returning a fresh accessibility snapshot of the resulting page, so you can decide the next move in the same turn. The moment you need to SEE something before choosing an action, end the batch and read the returned snapshot.

Guidance:

  • Prefer CSS selectors over refs inside a batch. Refs come from a prior snapshot and go stale the instant a step re-renders the page; selectors survive.
  • After a navigate (or an action that loads new content), add a { "cmd": "wait", "selector": "..." } step before interacting with the new content.
  • Add "optional": true to a step whose failure should not halt the batch.
  • Add "return": "drop" to a side-effect-only step you do not need echoed back (e.g. a screenshot taken only to trigger lazy-load).

Batchable cmds: navigate, wait, exists, click, type, fill, press_key, select_option, scroll, scroll_into_view, hover, extract, extract_all, extract_map, snapshot, screenshot, inject_css, evaluate.

To capture a redacted screenshot in one call: navigate → inject_css (blur the sensitive selectors) → wait → screenshot with a "path". The shot lands on disk already redacted and no image bytes come back.

Example — log in then land on the dashboard in one call:

json
{ "steps": [ { "cmd": "navigate", "url": "https://app.example.com/login" }, { "cmd": "wait", "selector": "#user" }, { "cmd": "fill", "selector": "#user", "value": "alice" }, { "cmd": "fill", "selector": "#pw", "value": "secret" }, { "cmd": "click", "selector": "button[type=submit]" }, { "cmd": "wait", "selector": ".dashboard" } ] }
ParameterTypeRequiredDescription
stepsarray of objectsYesOrdered list of actions. Each item is { "cmd": "<tool name>", ...that tool's arguments }. Optional per-step keys: "optional" (boolean — failure never halts the batch) and "return": "drop" (omit this step's output from the response).
on_errorstringNo"stop" (default): halt at the first failed step, marking the rest skipped. "continue": run every step regardless. Values: stop, continue.
snapshot_tailbooleanNoAppend a fresh accessibility snapshot of the final page to the response so you can decide the next action (default: true). Skipped automatically when the last step is already a snapshot or screenshot. Set false to opt out.

Next steps ​