tool field. This page documents each tool and its parameters.
{ "result": { ... } }.
A machine-readable skill specification for this API is available at
GET https://runchat.com/api/skills/canvas. AI agents can fetch this endpoint to
learn the full tool schema automatically. We also include links to this in the
ai-instructions metatag for any link to a workflow so you can simply share a
link to a workflow and ask it to follow any instructions.Typical workflow
get_canvas— discover what’s on the canvasread_nodes— inspect specific nodes and their handlescreate_prompt_node/create_code_node/ … /update_node/connect_nodes— build or modify the workfloworganize_nodes— auto-layout the resultrun_nodes— execute the workflow
Canvas Tools
get_canvas
Get a high-level overview of all nodes and edges on the canvas. Returns node IDs, types, labels, positions, and edge connections. Paginated at 50 nodes per page.
read_nodes
Read the full state of one or more nodes by ID. Returns each parameter’s name, type, label, status, and current data values. Use this to find handle names for connect_nodes.
Creating nodes
Each node type has its own creation tool with a flat, type-specific schema — easier to call correctly than one polymorphic tool. Every creation tool shares these optional fields:create_node (a single polymorphic call taking a type field) remains
available as a legacy alias and is the only way to create several nodes in
one call — see Creating multiple nodes.create_prompt_node
Create an LLM node (promptNode) for reasoning, writing, analysis, or agent tasks. Output is on the messages handle; structured output (output_format) is on artifacts.
create_input_node
Create a user-input widget (inputNode). Its value is exposed on the content handle. One input node holds a whole list — set a list with values, not one node per item.
create_image_node
Create a media generation node (imageNode) — images, video, 3D, or audio. Generated media is on the image handle. Always call get_model_params for the model first and use the returned parameter names as params keys.
create_code_node
Create a code node (codeNode). Code executes on the server only when the node is run. Output is on the result handle by default.
JavaScript nodes support multiple files: add a
package.json and helper modules with create_files after creation (this upgrades the node to the bundler sandbox automatically). Other languages have a single entry file.
create_note
Create a markdown note (noteNode) for documentation, summaries, or links.
place_tool
Place a published tool (found with search_tools) onto the canvas as a runChatNode.
create_artifact_node
Create an artifact node (artifactNode) that saves or fetches an artifact (blog post, website, or app).
Creating multiple nodes
The legacycreate_node tool takes a nodes array to create a whole pipeline in one call. Each item is a full node spec (type required), and an optional position lays it out. The response is { "count": N, "nodes": [ ... ] }.
position on any node to let it auto-place — batched nodes chain left-to-right in creation order off the existing workflow. Relative positions (right_of etc.) can reference any node that already exists, including ones created by an earlier call; they cannot reference siblings in the same batch (their IDs are generated server-side). If you set positions yourself you don’t need to call organize_nodes.
update_node
Update an existing node’s label, model, or input values.
connect_nodes
Connect an output of one node to an input of another — one edge, or many at once via edges.
Common handles:
When you pass
edges, the response is { "count": N, "edges": [ ... ] } with one result per edge — an edge that fails (e.g. an unknown handle) is reported individually without aborting the others.
organize_nodes
Auto-layout nodes on the canvas based on their connections. Call this after completing all node-creation and connect_nodes operations. The set expands automatically to every node connected to the ones you pass, and nodes the user has positioned manually are never moved — they act as fixed anchors the layout arranges itself around.
delete_nodes
Delete one or more nodes from the canvas. Also removes any connected edges.
delete_edges
Delete one or more edges (connections) from the canvas without deleting the nodes.
run_nodes
Execute one or more nodes on the canvas. Nodes run in dependency order — upstream nodes execute first. Returns status and output parameter names for each node.
Running nodes may consume credits. Confirm with the user before calling this
tool.
Tool Discovery
Find published tools (and the user’s own runchats) and run them directly, without first placing them on a canvas.These tools operate on the published-tool library, not the current canvas. For
inspect_tool and execute_tool the runchat_id in args names the
tool to act on — the {runchat_id} in the endpoint URL is only the
canvas/auth scope and is ignored by these tools.search_tools
Search published tools and the user’s own runchats by keyword. Returns each tool’s runchat_id, name, description, and its input/output parameter names — enough to run it with execute_tool.
inspect_tool
Inspect a published tool to see its inputs/outputs and a digest of its internal nodes (models, prompts, code) and connections. Optional — use it to learn how a tool is built or before placing it on a canvas; not required to run a tool.
execute_tool
Run a published tool and return its outputs, without adding it to a canvas. Provide inputs keyed by the tool’s input parameter names (from search_tools); the result reports any inputs that didn’t match.
Running a tool spends the authenticated user’s credits. Confirm before running
anything costly.
Media Tools
get_model_params
Get full parameter details for one or more models. Returns parameter names, types, and defaults — use these as initial_data keys when creating an imageNode.
view_image
Fetch an image from a URL for analysis. If the URL is a webpage rather than an image, a headless browser captures a viewport screenshot of it instead (spends credits).
Web Tools
First-party web search and page reading. Both spend the authenticated user’s credits.web_search
Search the web and get title/url/snippet results (Brave licensed index). Follow up with fetch_page on a result URL for full content.
fetch_page
Fetch a webpage in a headless browser (JavaScript executed) and return its content. Long pages are windowed: a truncated response includes next_offset — pass it back as offset to page through the rest (each page is a fresh render and billed call).
Code File Tools
EverycodeNode exposes a uniform file model. JavaScript nodes have an entry file (index.ts, plain JS or TypeScript) plus optional additional files (package.json for npm deps, helper modules, static .html assets) — adding files upgrades the node to the bundler sandbox automatically. Other languages (html, rhino-python, blender-python, revit-csharp) have a single entry file.
Entry filenames by language:
Always call
read_files (or read_nodes) first to discover the entry path — never guess based on language.
read_files
Read content from a code node. Returns each file’s path, line-numbered content, length, and whether it’s the entry file.
Response includes
code_mode, entry_file, and a files array of { path, entry, length, content } plus not_found if any requested paths are missing.
edit_file
Edit one file in a code node. Two modes:
- Targeted edit — pass
old_text+new_text.old_textmust match exactly (whitespace + indentation) and be unique in the file. Emptynew_textdeletes the matched span. - Full overwrite — pass only
new_text(omitold_text). Replaces the entire file.
read_files first to see current content.
create_files
Create one or more new files in a JavaScript code node (e.g. package.json, lib/utils.ts, a static index.html asset). JavaScript nodes only — other languages have a single fixed entry file. Adding files upgrades the node to the bundler sandbox automatically. Errors if any path collides with the entry file or an existing file.
delete_files
Delete one or more non-entry files from a JavaScript code node. Cannot delete the entry file.
read_status
Read current error messages, status messages, preview errors, and console output for a code node. Use when debugging a failing run.
Skill Endpoint
The Canvas API skill specification is available as a machine-readable document that AI agents can fetch to learn the full tool schema automatically.- API description and base URL
- All tool schemas with parameter types and descriptions
- Common handle names and workflow guidance