Skip to main content
Glama

Deploy a function

deploy_function
Idempotent

Put a function's current code live: from then on the LIVE site's address /api/sites/{site_id}/fn/{name} runs this code for every visitor or form that calls it, with the function's env vars and data access. It takes effect immediately, without a publish. Only deploy code the owner has reviewed; a draft with no code is refused.

Input Schema

NameRequiredDescriptionDefault
site_idYesThe site, from list_sites
functionYesThe function's name (slug), display name or id, from list_functions
user_goalNoOptional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / user_goal
      Added value: +{
      +  "description": "Optional: the user's goal behind this call, in one short sentence of plain words (e.g. \"add a page so customers can book tables\"). No names, emails or other personal details.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With annotations covering safety/idempotency, the description still adds the details annotations cannot: the change is immediate, affects every visitor and form hitting the live /api/sites/{site_id}/fn/{name} route, and carries the function's env vars and data access. It also discloses the refusal case (empty draft), which is exactly the failure an agent needs to anticipate.

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 tight sentences: what happens, when it takes effect, and the guardrail — front-loaded with the action and effect before the caveat. No filler.

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?

For a mutating deploy tool with no output schema and fully documented parameters, the description supplies the missing blast-radius and precondition context. Nothing an agent needs in order to call this correctly is absent.

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 100% and each parameter already has a description naming the source call (list_sites, list_functions), so the schema does the heavy lifting. The description only implies site_id/name via the URL template and says nothing about user_goal; baseline 3 applies.

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?

States a specific verb and resource ('Put a function's current code live') and goes further to name the exact live endpoint that will serve the code, the traffic it affects, and that it happens without a publish — which separates it from publish_site and the draft/creation siblings.

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?

Gives a clear usage rule — deploy only owner-reviewed code, and a draft with no code is refused — which is real guidance on when the call will succeed. It does not, however, name the alternatives (test_function, create_function_draft, generate_function_code) or tell the agent to test before deploying.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources