Skip to main content
Glama

invoke_function

Invoke a deployed function via HTTP. Free functions allow direct testing; paid functions require an idempotency key and return a result or pollable run ID.

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?

The description adds value beyond annotations by explaining free vs paid behavior, idempotency_key semantics, error handling with isError=true, and the polling mechanism. Annotations are generic (readOnlyHint=false, idempotentHint=false), so the description provides necessary behavioral context.

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?

The description is concise (3 sentences), front-loaded with the core purpose, and every sentence adds necessary detail. No redundant or irrelevant information.

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 complexity (9 parameters, no output schema), the description covers key behaviors: free vs paid, idempotency, error handling, and polling. It lacks a description of the return value structure beyond 'result or pollable run_id', but it is sufficiently complete for most use cases.

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 parameters are well-documented. The description adds meaning to idempotency_key ('reuse for same paid intent') and wait parameter (polling with idempotency_key replay), which goes beyond the 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 verb 'Invoke' and resource 'deployed function via HTTP', distinguishing it from sibling tools like deploy_function or delete_function. It is specific and unambiguous.

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

Usage Guidelines4/5

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

The description provides clear context on when to use this tool: it distinguishes free vs paid functions, explains idempotency_key requirement, and mentions polling behavior. However, it does not explicitly contrast with alternatives or state when not to use.

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-mcp'

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