Skip to main content
Glama

create_function_run

Create a durable function run with idempotency key for reliable scheduling. Supports delayed execution, retries, and expiry to replace ad hoc cron or polling.

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?

With no annotations, the description carries the full burden. It discloses key behaviors: required idempotency key, scheduling options (immediate, delay, run_at), expiry, retry policy, and optional wait. However, it does not mention that the function must already exist, what happens on idempotency key reuse, or the return value (run ID). These are meaningful gaps.

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?

Three sentences: first states action and requirement, second lists capabilities, third gives usage guidance. No redundant information, 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 14 parameters, no output schema, and nested retry object, the description covers the core purpose and key scheduling/retry behaviors. However, it omits prerequisite (function existence), return value (run ID), and idempotency semantics (reuse behavior). These gaps reduce completeness for an agent expecting to use the tool correctly.

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 coverage is 93%, so the input schema already documents most parameters well. The description adds value by emphasizing the required idempotency key and the optional wait behavior, but it does not compensate for the remaining 7% or add deeper meaning 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?

Clearly states 'create a durable function run' with a specific verb and resource. Distinguishes from ad hoc cron/polling and implies difference from sibling invoke_function by emphasizing durability, retries, and redriven capability.

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?

Explicitly says 'Use this instead of ad hoc cron/polling when work must survive retries or be redriven.' This provides clear context for when to choose this tool over simpler alternatives, though it could explicitly mention invoke_function as an alternative for non-durable runs.

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