Skip to main content
Managed OpenAPI and MCP tool sets can expose more operations than one agent should use. Availability filters set the reachable boundary. Approval rules add a human decision before selected calls execute. This guide starts with the six-operation Swagger Validator specification. It keeps only reviewByUrl, marks that operation as approval-required, and verifies the complete pause, approve, execute, and resume sequence.

What you need

  • A Cadenya workspace.
  • A published agent, or permission to create one with Create and publish an agent.
  • CADENYA_API_KEY and CADENYA_WORKSPACE_ID for the code example.

Start with a managed source

Create an OpenAPI tool set with:
Click Generate Preview. Before filtering, the source contains six operations. The same controls are available for an MCP tool set. HTTP and Bare tool sets are hand-defined, so omit or disable their individual tools instead of filtering a source sync.

Set the availability boundary

On Tool behavior, add an Include tools rule:
Tool behavior settings with an exact include filter for reviewByUrl and all three approval policy choices

An exact-name include rule and the available approval policies

Regenerate the preview. It should report:
  • Six tools found
  • One available
  • Five omitted
Include rules form the initial candidate set. Exclude rules remove tools from that set. A tool must pass both stages to become Available.

Match all or any

Multiple rules use one top-level operator:
  • Match all requires every rule to match the same tool.
  • Match any requires at least one rule to match.
There is no nested boolean expression. When a policy needs grouping such as (A and B) or C, simplify the naming convention, use a regular expression, or split the source into separate tool sets.
Omitted tools remain visible in the dashboard and sync inventory, but agents never receive them. The sync count describes operations processed from the source, not only the tools left available.

Require approval for the operation

Under Approval requirement, choose Only matching tools require approval. Add the same exact-name rule for reviewByUrl. The three policies behave differently: Approval filters do not change availability. They set requiresApproval on matching tools during sync. In this example, the Tools tab shows reviewByUrl as Available and approval-required, while the other five operations remain Omitted. Save the tool set and wait for its sync to complete before assigning it to an agent.

Assign and dispatch

Assign the whole tool set to an agent variation. Use a prompt that calls reviewByUrl with the URL from the user, then publish the agent. Dispatch a validation objective:
The model can propose the call, but Cadenya does not send the HTTP request yet. The tool call enters TOOL_CALL_STATUS_WAITING_FOR_APPROVAL.

Approve the paused call

Find waiting calls and approve the one your application reviewed:
Approving changes the call to TOOL_CALL_STATUS_APPROVED. Cadenya executes it, records the result, and lets the objective continue. The vetted timeline contains:
Objective timeline showing Tool Approval, Tool Approved, reviewByUrl called, Tool Result, and the final assistant message

The approved call resumes and completes in the same objective

Approval is an authorization decision, not argument editing. If the proposed arguments are unsafe or incorrect, deny the call and include a memo telling the agent what to change.

Deny and redirect

Use deny when the call should not execute:
The memo becomes context for the agent, which can choose a safer next action. A denial does not automatically fail the objective.

Configure the same policies from the SDK

Availability and approval use the same filter shape:
Use { type: 'always', always: true } for toolApprovals when every available operation should pause.
You now have separate controls for what an agent can see and what a person must authorize before execution.

Next steps

Build the approval callback

Turn the approval decision into an application workflow.

Prevent tool bloat

Load available tools progressively after filtering the source.

Stream objective events

React to approval requests without polling.

Tool sets from the SDK

Manage the complete tool set lifecycle.