Skip to main content
Glama

Read edge function source files

supabase_function_get
Read-onlyIdempotent

Read the source files of a Supabase edge function deployment by name so you can inspect stored code before replacing it.

Instructions

Read edge function source files

Returns an object mapping relative file paths to stored source text, with caching disabled. Select a deployment name from supabase_functions_list; an unknown deployment returns 404, and supabase_function_replace writes its replacement contents.

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": {
      "cluster": "<cluster>",
      "name": "<name>"
    },
    "name": "supabase_function_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesExact deployment name from supabase_functions_list; 1–63 lowercase letters, digits, underscores or hyphens, starting with a letter or digit (pattern [a-z0-9][a-z0-9_-]{0,62}).
clusterYesManaged cluster name; the RBAC object is namespace/cluster.
namespaceNoNamespace of the requested object; defaults to default for single-object routes and creation. On collection routes (/clusters, /operations, /events, /events/stream, /orphaned-volumes, /backup-storages and root /metrics), absence includes all authorized namespaces and a value filters to that namespace. A nonexistent explicit namespace returns 404 not_found with resource namespace and its name only when the authenticated caller has a permission in that namespace. Otherwise collections remain empty and object requests retain their normal 403 response without revealing existence. Public and unauthenticated authentication routes do not resolve the parameter.

Output Schema

NameRequiredDescriptionDefault
operationIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / $defs / NamespaceName
      Removed value: -{
      -  "description": "Project namespace name, 2–32 lowercase letters, digits or hyphens; starts with a letter and ends with a letter or digit. The existing default namespace is reserved.",
      -  "maxLength": 32,
      -  "minLength": 2,
      -  "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      -  "type": "string"
      -}
    • addedInput schema / $defs / NamespaceName_depth16
      Added value: +{
      +  "description": "Project namespace name, 2–32 lowercase letters, digits or hyphens; starts with a letter and ends with a letter or digit. The existing default namespace is reserved.",
      +  "maxLength": 32,
      +  "minLength": 2,
      +  "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      +  "type": "string"
      +}
    • addedInput schema / properties / cluster / description
      Added value: +"Managed cluster name; the RBAC object is namespace/cluster."
    • addedInput schema / properties / name / description
      Added value: +"Exact deployment name from supabase_functions_list; 1–63 lowercase letters, digits, underscores or hyphens, starting with a letter or digit (pattern [a-z0-9][a-z0-9_-]{0,62})."
    • changedInput schema / properties / namespace / $ref
      Previous value: -"#/$defs/NamespaceName"New value: +"#/$defs/NamespaceName_depth16"
    • addedInput schema / properties / namespace / description
      Added value: +"Namespace of the requested object; defaults to default for single-object routes and creation. On collection routes (/clusters, /operations, /events, /events/stream, /orphaned-volumes, /backup-storages and root /metrics), absence includes all authorized namespaces and a value filters to that namespace. A nonexistent explicit namespace returns 404 not_found with resource namespace and its name only when the authenticated caller has a permission in that namespace. Otherwise collections remain empty and object requests retain their normal 403 response without revealing existence. Public and unauthenticated authentication routes do not resolve the parameter."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "Relative file paths mapped to source text, including a nonempty index.ts entrypoint. Total source bytes must not exceed 1 MiB; parent path components are forbidden.",
      +  "minProperties": 1,
      +  "properties": {
      +    "operationId": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv0.4.3

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered; the description adds genuinely new behavior beyond that: caching is disabled (reads are fresh) and an unknown deployment yields a 404. The return shape is described rather than left implicit, though nothing is said about size limits or partial failures.

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?

Two short sentences, front-loaded with purpose, then return shape, then routing and error behavior. The opening line largely repeats the title, which is minor waste but not harmful; nothing else is extraneous.

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?

An output schema exists and annotations carry the safety profile, so the description only needs purpose, sourcing of the required name, and error behavior — all of which are present. The namespace and cluster parameters are fully documented in the schema, so their absence from the description is not a gap.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds provenance the schema cannot: the deployment name must be an exact value taken from supabase_functions_list. That materially reduces wrong-value calls, even though cluster and namespace semantics are left 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 specific verb and resource ('Read edge function source files') and adds the return shape: an object mapping relative paths to stored source text. It also names the sibling that lists deployments and the sibling that writes replacements, so the agent can place it among alternatives 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 Guidelines4/5

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

Gives a clear precondition ('Select a deployment name from supabase_functions_list') and points to supabase_function_replace for the write path, which effectively routes read-vs-write decisions. It stops short of an explicit 'do not use this when…' exclusion, so it is clear context rather than a full when/when-not rule set.

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

Deploy Server

Other Tools