Skip to main content
Glama

Deploy an edge function

functions.deploy

Create or replace an edge function (Deno, TypeScript). Pass source for a single file, or files (path -> source) with an entrypoint. It is served at /functions/v1/. Scope: functions:write.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "functions.deploy"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesFunction name: letters, digits, - and _
filesNoMulti-file deploy: {"path": "source"}
branchNoBranch (environment) id. Optional: defaults to `production`.
sourceNoThe entrypoint module's source (index.ts)
entrypointNoEntrypoint inside files, default index.ts
import_mapNoInline import map
project_idNoProject id. Optional: defaults to the project created or used last in this session, or the only one.
verify_jwtNoRequire a valid JWT to call it (default true)
organization_idNoOrganization id. Optional: defaults to the token's organization, or the only one you belong to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare the mutation/safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description adds genuinely useful context beyond them: upsert semantics ('Create or replace'), the required auth scope ('functions:write'), and the serving URL pattern. There is a mild tension between 'replace' (existing code is overwritten) and destructiveHint=false, but that reads as an upsert rather than a deletion, so it is not a contradiction; the missing piece is what happens on failure or whether the old version is retained.

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, front-loaded with the verb and resource, then the two invocation modes, then the endpoint and required scope. No filler or redundant restatement of the title.

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?

For a nine-parameter, nested-object mutation with no output schema, the description covers what the tool creates, the two input shapes, the resulting URL, and the required scope. It stops short of describing what is returned on success (function id/version/URL object) or how branch and project defaults interact, which is a modest gap given there is no output schema to carry that information.

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 description coverage is 100%, so the baseline is 3. The description does add one thing the schema cannot express, namely the relationship between `source` and `files`+`entrypoint` as two alternative deploy shapes, but it does not explain the remaining seven parameters (branch, import_map, verify_jwt, project_id, organization_id), leaving that entirely to 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?

States a precise verb ('Create or replace') and a precise resource ('an edge function'), plus the runtime (Deno, TypeScript) and the resulting URL. An agent can distinguish this from siblings like functions.list, functions.logs, and deploy.run without opening any schema.

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

Usage Guidelines3/5

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

The description gives the two invocation modes ('Pass `source` for a single file, or `files` ... with an `entrypoint`'), which is real guidance, but it never says when to choose this tool over siblings such as deploy.run or when not to use it (e.g., re-deploying an unchanged function). Usage is implied rather than framed as a decision rule.

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