Skip to main content
Glama

call_api

Execute single API calls or orchestrate multi-step API workflows with sequential, parallel, conditional, and loop operations through APIClaw's extensive API index.

Instructions

Execute an API call through APIClaw. Supports single calls AND multi-step chains.

SINGLE CALL: Provide provider + action + params CHAIN: Provide chain array to execute multiple APIs in sequence/parallel with cross-step references.

Chain features:

  • Sequential: Steps execute in order, each can reference previous results via $stepId.property

  • Parallel: Use { parallel: [...steps] } to run concurrently

  • Conditional: Use { if: "$step.success", then: {...}, else: {...} }

  • Loops: Use { forEach: "$step.results", as: "item", do: {...} }

  • Error handling: Per-step retry/fallback via onError

  • Async: Set async: true to get chainId immediately, poll or use webhook

Example chain: chain: [ { id: "search", provider: "brave_search", action: "search", params: { query: "AI agents" } }, { id: "summarize", provider: "openrouter", action: "chat", params: { message: "Summarize: $search.results" } } ]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerNoProvider ID (e.g., "46elks", "brave_search", "resend", "openrouter", "elevenlabs", "twilio", "coaccept", "frankfurter")
actionNoAction to perform (e.g., "send_sms", "search", "send_email", "chat", "send_invoice", "convert")
paramsNoParameters for the action. Varies by provider/action.
customer_keyNoOptional: Your own API key for providers that require customer authentication (e.g., CoAccept).
confirm_tokenNoConfirmation token from a previous call. Required to execute actions that cost money after reviewing the preview.
dry_runNoIf true, shows what WOULD be sent without making actual API calls. Returns mock response and request details. Great for testing and debugging.
chainNoExecute multiple API calls as a single chain. Each step can reference previous results via $stepId.property
continueOnErrorNoContinue chain execution even if a step fails (default: false)
timeoutNoMaximum execution time for the entire chain in milliseconds
asyncNoReturn immediately with chainId. Use get_chain_status to poll or provide webhook.
webhookNoURL to POST results when async chain completes
subagent_idNoOptional subagent identifier for multi-agent tracking
ai_backendNoAI backend making this request (e.g., "claude-3-sonnet", "gpt-4"). Used for analytics.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: support for single calls and chains, chain execution modes (sequential/parallel), error handling (onError), async operations (async, webhook), and dry-run capabilities. It mentions cost implications (confirm_token for money-costing actions) and testing (dry_run). However, it lacks explicit rate limits, authentication defaults, or detailed error response formats.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (SINGLE CALL, CHAIN, Chain features) and bullet points for features. It's appropriately sized for a complex tool but includes some redundancy (e.g., chain features listed could be more condensed). The front-loaded purpose is clear, and every sentence adds value, though the example chain is detailed but necessary for comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's high complexity (13 parameters, nested objects, no output schema, no annotations), the description does a good job covering execution modes, chain features, and usage examples. It compensates for lack of annotations by describing behaviors like async operations and error handling. However, it doesn't detail return values or response formats, which is a gap since there's no output schema, and could better explain authentication defaults or common error cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 13 parameters thoroughly. The description adds minimal parameter semantics beyond the schema: it mentions provider + action + params for single calls and chain array for multi-step, but doesn't explain parameter interactions or provide additional syntax details. The example chain illustrates usage but doesn't deepen parameter understanding beyond schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Execute an API call through APIClaw' with support for 'single calls AND multi-step chains.' It distinguishes itself from siblings like get_api_details, discover_apis, or get_chain_status by focusing on execution rather than metadata or status checking. The verb 'execute' is specific and the resource 'API call' is well-defined.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: for single API calls (with provider, action, params) or multi-step chains. It implicitly distinguishes from siblings by not covering capabilities like checking balance (check_balance), estimating costs (estimate_cost), or resuming chains (resume_chain). The detailed chain features (sequential, parallel, conditional, loops) offer clear context for complex workflows.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nordsym/apiclaw'

If you have feedback or need assistance with the MCP directory API, please join our Discord server