Skip to main content
Glama

Get function

get_function
Read-only

Read one sandboxed user function by id from the caller's workspace — its name, description, code, input/output schemas, version, status and exposed_as_tool flag. Read-only. Returns null when no such function is visible to the caller (a wrong-owner/tenant id is indistinguishable from a missing one — it never leaks another workspace's function).

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": {
      "function_id": "<function_id>"
    },
    "name": "get_function"
  }
}

Input Schema

NameRequiredDescriptionDefault
function_idYes

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 readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered; the description adds genuinely new behavior: it returns null when the function isn't visible, and a wrong-owner/tenant id is deliberately indistinguishable from a missing one so no cross-workspace data leaks. That tenant-isolation and null-return contract is exactly the kind of context annotations cannot express.

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?

Two sentences, both front-loaded: the read action and scope come first, the behavioral contract second. The field enumeration is dense but earns its place given there is no output schema, and there is no filler wording.

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?

With no output schema, the returned-field list fills that gap, and the null/visibility semantics cover the main ambiguity for an agent reading results. Minor omissions remain (no note on whether 'code' can be truncated or on failure modes other than null), so it falls just short of fully complete.

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?

There is one parameter (function_id) with 0% schema description coverage, so the description carries the burden. Saying 'by id' establishes that the argument is an identifier rather than a name, but it gives no format, source, or validation detail, leaving the parameter only partially characterized.

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 uses a specific verb and resource ('Read one sandboxed user function by id') and pins the scope to 'the caller's workspace', which separates it from get_function_run (execution) and the create/update/delete siblings. It also enumerates the exact fields returned, so an agent knows precisely what this call yields without opening a 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 'by id' phrasing implies a single-record lookup versus listing or running, and the workspace scoping hints at visibility limits, but no sibling is named and there is no explicit when-to-use/when-not statement. Guidance is inferable rather than stated.

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