Skip to main content
Glama

Invoke Function

invoke_function

Run a backend function of an owned app exactly like the HTTP route and return its status and JSON. caller='owner' runs as the app owner; caller='anonymous' first evaluates the function policy as a public visitor and returns the 401/403 decision without running when access would be denied. Use it to verify a function (secrets, outbound calls, policy) before wiring it into the app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYesThe app ID
callerNoowner
paramsNoJSON body passed to the function
headersNoOptional extra request headers to simulate, e.g. a webhook secret header
functionYesFunction name, e.g. probe

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only say the tool is not read-only, not idempotent, and not destructive, leaving safety details to the description. The description compensates by explaining exact HTTP-equivalent execution, the owner vs anonymous policy evaluation, and the early 401/403 return without execution. This goes beyond annotations, although it does not enumerate side effects or failure modes beyond 401/403.

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 sentences pack the main behavior, caller semantics, and intended usage with no filler. Front-loading the core action makes it easy for an agent to scan. It is appropriately sized for the tool's complexity.

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 five-parameter tool with no output schema and sparse annotations, the description gives enough operational context: execution model, caller behavior, and a concrete verification use case. It could specify return shape more precisely, but 'status and JSON' plus the 401/403 behavior covers the main contract. No critical invocation requirement is missing.

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 already documents 80% of parameters, so the baseline is 3. The description adds meaningful caller semantics: owner runs with owner rights, anonymous evaluates policy as a public visitor and returns 401/403 without running when denied. This extra detail for the caller parameter raises it above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific action and target: 'Run a backend function of an owned app exactly like the HTTP route and return its status and JSON.' This clearly identifies the resource and behavior, and the caller-mode detail further distinguishes it. It does not explicitly name a sibling alternative, so it stops short of full differentiation.

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?

The closing sentence gives concrete use cases: 'verify a function (secrets, outbound calls, policy) before wiring it into the app.' It also explains the owner vs anonymous context, which informs when to set caller. It provides clear context but no explicit when-not-to-use or alternative tool names.

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