Skip to main content
Glama

invoke_function

Invoke a deployed function via HTTP. Free functions run directly; paid invocations require an idempotency key and can be polled for results.

Instructions

Invoke a deployed function via HTTP. Free functions behave like the direct test path; paid functions require idempotency_key and may spend allowance, returning a result or pollable run_id. Stable errors preserve code and set isError=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoRequest body (string or JSON object)
nameYesFunction name to invoke
waitNoWhen a paid invocation returns a 202 run handle, poll the run and replay the same idempotency key for the retained result.
methodNoHTTP method (default: POST)
headersNoAdditional headers to send
project_idYesThe project ID
timeout_msNoMaximum wait time in milliseconds when wait is true.
idempotency_keyNoStable Idempotency-Key required by paid function invocations. Reuse it for the same paid intent; use a new key only for a new paid intent.
poll_interval_msNoPolling interval in milliseconds when wait is true.
Behavior4/5

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

Annotations already indicate non-read-only and non-idempotent behavior. The description adds that paid functions may spend allowance and that stable errors preserve code with isError=true, providing useful behavioral context beyond annotations.

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

Conciseness5/5

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

Two concise sentences with no fluff, front-loaded with the primary action. Every sentence earns its place.

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

Completeness3/5

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

Given 9 parameters and no output schema, the description is somewhat sparse. It covers free/paid split and error behavior but omits details on return values or required parameters (project_id, name). Missing context for a complex tool.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value by explaining the role of idempotency_key for paid functions and the wait/poll behavior, enhancing 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 'Invoke a deployed function via HTTP', which is a specific verb+resource. It distinguishes free vs paid functions, providing clarity on scope.

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

Usage Guidelines3/5

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

The description differentiates free and paid function usage but does not explicitly state when not to use this tool or mention alternatives like create_function_run. Implied context but no direct guidance.

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/kychee-com/run402'

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