Skip to main content
Glama

Wisp

Invoke function

invoke_function

Run a function (also private ones and those not exposed over HTTP, whose input is the body): mode "test" runs the draft (?test), "live" the published version. Returns status, headers, body and (test mode) console output. Counts as a normal request (logged, uses Run credits).

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": {
      "project": "<project>",
      "function": "<function>"
    },
    "name": "invoke_function"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoRaw body (JSON text for JSON APIs)
modeNotest
queryNo
methodNoDefaults to the function's method
headersNo
projectYesProject id (p…) or address (slug)
subpathNo
functionYesFunction name (e.g. "orders") or id (e…)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With only openWorldHint supplied by annotations, the description carries most of the burden and does well: it discloses the return shape (status, headers, body, plus console output in test mode) and, importantly, that the call is logged and consumes Run credits — cost and side-effect information an agent cannot infer from structured fields. It stops short of stating that invoked code may mutate external state or what happens on function errors.

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 compact sentences, front-loaded with the action and scope, then mode semantics, then return and cost behavior. The parentheticals are dense but each carries distinct information; nothing is redundant with the title or schema.

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 an 8-parameter execution tool with no output schema, the description covers purpose, mode semantics, return contents, and billing/logging impact — enough to call it correctly. Gaps remain around subpath/query composition and failure behavior, but they are secondary for a tool of this shape.

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 only 50% across 8 parameters, so the description must compensate, and it does for the two most consequential ones: mode is explained in terms of draft vs published semantics and the ?test suffix, and body is framed as the input payload for functions without an HTTP interface. Query, headers, subpath, and method receive no additional meaning beyond their schema defaults.

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 opens with a specific verb+resource ("Run a function") and immediately scopes it: private functions and functions not exposed over HTTP are included, with their input carried in the body. This clearly separates it from sibling read/write tools like get_function, update_function, or publish, which manipulate metadata rather than execute code.

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?

It gives concrete guidance on mode selection — "test" runs the draft (?test), "live" the published version — which is real decision support for the one enum parameter. However, it never states when to use this tool versus alternatives (e.g. when to invoke live vs publish first), nor any prerequisite or exclusion conditions, so usage context is only implied.

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