Skip to main content
Glama

functions_rebuild

Rebuild one or all functions with the latest platform runtime wrapper without changing source code. Apply gateway-side fixes to already-deployed functions.

Instructions

Refresh function(s) onto the platform's current entry wrapper + bundled runtime WITHOUT changing source (capability function-runtime-rebuild, gateway v1.69+). Provide name to rebuild one function, or omit it to rebuild every function in the project. Re-bundles from each function's STORED source with deps pinned to the recorded exact versions, so the source code_hash is unchanged and no new release is created — this is how a gateway-side wrapper fix (e.g. an SSR auth.* fix) reaches an already-deployed function (a plain redeploy with unchanged source does NOT pick it up). Strictly opt-in; the platform never auto-rebuilds. Wallet-authed (project ownership; no service key) and allowed during billing grace. Functions deployed before dependency locking return CANNOT_REBUILD_UNLOCKED_DEPS — redeploy them from source with deploy_function. Use list_functions (runtime_stale) or run402 doctor to find stale functions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoFunction name to rebuild. Omit to rebuild every function in the project (batch).
project_idYesThe project ID
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: it re-bundles from stored source with pinned deps, does not change source code_hash, does not create a new release, is strictly opt-in, requires gateway v1.69+, and details the error case for unlocked deps. It also states auth requirements and grace period allowance.

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 information-dense and front-loaded, but somewhat lengthy. However, every sentence adds necessary detail, so while it could be slightly tightened, it remains efficient for the complexity of the tool.

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

Completeness5/5

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

Despite no output schema, the description covers what happens (no new release, source unchanged), error cases (unlocked deps), prerequisites, and alternatives. It fully explains the tool's role and effects, making it complete for an agent to understand and use correctly.

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

Parameters5/5

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

The schema covers both parameters with descriptions. The tool description adds crucial context: omitting name triggers batch rebuild of all functions, and it explains the significance of the name parameter in determining scope. This adds value beyond the schema.

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: to refresh functions onto the current entry wrapper and runtime without changing source. It specifies the verb (rebuild), resource (functions), and scope (one or all). It distinguishes from sibling tools like deploy_function by noting it re-bundles stored source and is not a redeploy.

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 applying gateway-side wrapper fixes to already-deployed functions. It also gives alternative instructions for when dependencies are unlocked (use deploy_function). It mentions prerequisites (wallet-auth, no service key, allowed during grace) and recommends checking stale functions via list_functions or run402 doctor.

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/MajorTal/run402'

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