Building tools

When the tool your agent needs does not exist, there are three ways to make it.

Ask the AI to build it

An agent with the actions:build scope calls create_action with a plain-language description, for example "post a daily summary to #ops". ToolGlue places a refundable hold of $0.50 on your balance (the amount is always stated before anything is spent), then an AI build loop researches the API, drafts the tool, and tests it against one of your live connections. Only connections you have flagged as allowing build testing are used. The loop fixes and retests up to eight times before giving up.

The hold is not the price. When the build finishes it settles at what the models actually used, never more than the hold, and the unused remainder refunds to your balance automatically: a $0.50 hold on a build that used a few cents settles at those few cents. A failed build refunds what was not spent. Watch progress live on the build page, including per-step token counts and cost against the hold. Rebuilds work the same way through update_action or the "rebuild with feedback" box on the tool's detail page.

Agent-initiated builds also obey your workspace's tool policy: by default an agent needs an open tool window (Settings, "Agent tool changes") before it may create or rebuild anything. See the Security article for how the window works.

Brief the builder for a one-shot build

The single biggest lever on build quality is context. The build dialog (and the context argument on create_action) takes anything you or your agent already know: docs excerpts, the exact endpoint and its request and response shapes, auth quirks, a sample response. The builder treats that context as authoritative, plans from it, and judges the test run against it, so a well-briefed build usually lands on the first try instead of paying for trial and error. An example input helps too: pass one and the builder shapes the input schema around it and uses it for the live test. The connector's docs page is also fetched and read automatically when it has one, and deleting a tool later is a soft delete you can undo from the tool's page.

Write it by hand

The manual editor at Actions, New action creates a tool without any AI involvement, for free. You choose a key, a target connector, a JSON Schema for the inputs, and an implementation: either an API template (method, path, body with {{input.x}} placeholders, and an optional JSONPath to pick the output) or JavaScript code that runs in the sandbox. Manual saves are validated server-side and go live immediately, skipping the AI build loop.

Test it in the Playground

The Playground page is a test bench for every tool in the workspace: saved actions, external server tools, and an ad-hoc raw request bench. It generates a form from the tool's input schema, shows the real per-run price above the Run button, and dispatches through exactly the same pipeline agents use, so billing, security checks, and run recording are identical. Test there before pointing agents at a new tool.

Bring a prebuilt server

Existing MCP servers from npm or PyPI can join the workspace too; see External MCP servers.

Something went wrong on our side. Reload
Interactive features couldn't start. The realtime connection is being blocked. If this domain sits behind Cloudflare or a WAF, allow websockets to /_blazor. Retry