Skip to main content
A tool set is how an agent does more than talk. You point it at a provider, Cadenya discovers the tools behind it, and any variation you assign it to can call them. This page covers the four adapter kinds, secrets, curation, and wiring a set to an agent.

What you need

  • Your API key in CADENYA_API_KEY and a workspace ID in CADENYA_WORKSPACE_ID.

Four adapters, one shape

Every tool set has one spec.adapter, and its type field names where the tools come from, with the matching key alongside it:

The quick path: MCP

An MCP server is the fastest way to a working tool set. Point at the URL and the tools sync in the background, then refresh hourly.
The call returns STATE_ACTIVE at once, but discovery happens in the background, so info.toolCount reads 0 for a moment. There is no sync endpoint. To block until the tools exist, poll the event log:
A syncCompleted can still carry a message listing tools that failed while the sync as a whole succeeded, so compare toolsSynced against what you expect.

OpenAPI: an API becomes a tool set

Point at a spec URL and each named operation becomes a tool. Filters can keep only the operations an agent needs.
This configuration processes six operations and leaves reviewByUrl available while the other five remain omitted. A URL-backed OpenAPI set re-syncs hourly, so it tracks the upstream specification.

Bare and HTTP: your code is the tool

A bare or http set starts empty; you define the tools. The difference is who runs them. An http tool calls the base URL for you. A bare tool fires nothing, your code fulfills the call.
All four spec fields are required and enforced: a misspelled parameters or a missing config is a 400, not a silently broken tool. llmToolName comes back cleaned up: issue_refund becomes IssueRefund, the name the model calls. When an agent calls a bare tool, the objective parks at TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT. Your worker finds it and answers:
That is a reverse harness: Cadenya never needs a route into your network.

Secrets: reference, never inline

A tool set that talks to a real API needs a credential. Store it as a secret and reference it by name; never put the value in an adapter header, which is returned on read.
Cadenya swaps ${ORDERS_TOKEN} in at call time, so the plaintext lives only in the request Cadenya makes. Read the secret back and its value is "", always. A per-run objective secret of the same name overrides this one, which is how a per-user token beats a shared service credential.

Curate what syncs

For a synced set, curation lives on the adapter, not on the tools, because a filter is reapplied on every sync while a per-tool change is not.
Editing the adapter also triggers a re-sync, which is the only way to force one. Use includeTools for an allowlist instead.

Hand it to an agent

A tool set does nothing until a variation assigns it. Assign the whole set, and tools discovered on a later sync reach the agent automatically:
Publish the agent, and its next objective can call every tool in the set. To confirm what an agent got, read the objective’s tools, which is the resolved, deduplicated, filtered list, not the raw set.

Retire a set

Archive stops the sync and hides the set but keeps it, and works even while a variation still assigns it. Delete is permanent and refuses while assigned.

Next steps

Connect an MCP server

The hands-on MCP lesson, end to end.

Run tools in your code

Define a Bare tool and fulfill its calls from your application.

Approve a tool call

Gate a requiresApproval tool behind a human.

Store and use secrets

The full precedence story, workspace to objective.

Preventing tool bloat

Progressive discovery, for a set too big to load at once.