Skip to main content
Glama

create_function_run

Create a durable function run with a required idempotency key. Supports immediate, delayed, or run_at scheduling, expiry, retry policy, and optional wait.

Instructions

Create a durable function run with a required idempotency key. Supports immediate, delayed, or run_at scheduling, expiry, retry policy, and optional wait. Use this instead of ad hoc cron/polling when work must survive retries or be redriven.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFunction name to run
waitNoWait until the run becomes terminal before returning.
delayNoDelay before first attempt, such as `10m`, `1h`, or `3d`. Mutually exclusive with run_at.
retryNo
run_atNoAbsolute ISO-8601 first-attempt time. Mutually exclusive with delay/delay_seconds.
payloadNoJSON object payload delivered to the handler
event_typeYesApplication event type delivered to the function run handler
expires_atNoAbsolute ISO-8601 expiry time.
project_idYesThe project ID
timeout_msNoMaximum wait time in milliseconds.
delay_secondsNoDelay before first attempt in seconds. Mutually exclusive with delay and run_at.
expires_afterNoRelative expiry duration, such as `1d`.
idempotency_keyYesRequired idempotency key. Reuse it when retrying the same logical work item.
poll_interval_msNoPolling interval in milliseconds.
Behavior3/5

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

No annotations are provided, so the description bears full responsibility. It lists features like idempotency key, scheduling, retry, and expiry, but omits details on default behavior (e.g., whether wait is off by default), side effects (e.g., charging), or execution guarantees (e.g., what constitutes 'durable'). The schema covers parameter semantics well, but the description lacks broader 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 three concise sentences. The first sentence states the core action. The second lists key features. The third gives usage guidance. It is front-loaded, efficient, and contains no filler.

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?

Despite the tool's complexity (14 parameters, nested retry object, no output schema), the description covers purpose and usage well but lacks information on return values (run ID?), error scenarios, and default wait behavior. The schema fills some gaps, but the description alone is insufficient for full agent understanding of the tool's lifecycle.

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?

With 93% schema description coverage, the baseline is 3. The description mentions several parameter categories (idempotency_key, scheduling, expiry, retry, wait) but does not add new semantics beyond what the schema already provides for each parameter. The schema descriptions are already detailed (e.g., format examples, mutual exclusivity).

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 creates a durable function run, with a required idempotency key. It enumerates supported scheduling types (immediate, delayed, run_at), expiry, retry policy, and optional wait, making the purpose specific and distinct from sibling tools like invoke_function or cron.

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 explicitly advises using this tool instead of 'ad hoc cron/polling when work must survive retries or be redriven', providing strong usage guidance. However, it does not directly contrast with the sibling invoke_function, which could be used for non-durable synchronous runs, but the context is clear enough for most agents.

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