Skip to main content
Glama

run_function

Destructive

Execute a deployed function to test API endpoints. Inspect response body field names and types to align your frontend code with the backend.

Instructions

Execute a deployed function and return the real response. Use this to test your API endpoints.

Returns: { status, headers, body, logs, error, duration_ms }

Example: run_function({ project_id: 1, path: "/api/users", method: "GET" }) Example: run_function({ project_id: 1, path: "/api/users", method: "POST", body: { name: "Alice" } })

IMPORTANT: Always run_function on your API endpoints after writing them. Inspect the response body field names and types. Then write your frontend to match those exact names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID (e.g. proj_a8Kq7fR2xZ)
pathYesFunction route path (e.g. "/api/services")
methodNoHTTP method
bodyNoRequest body (for POST/PUT)
headersNoAdditional request headers
queryNoURL query parameters
Behavior3/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false, so the description's statement 'execute and return real response' aligns. The description adds return fields (status, headers, body, logs, error, duration_ms) and mentions 'real response' implying it actually runs the function, which is consistent with destructive hint. No contradiction.

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?

Description is concise with examples and an important usage note. Front-loads purpose and return structure. Could be slightly more concise but overall efficient.

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?

Given the tool's complexity (6 parameters, nested objects) and no output schema, the description adequately explains return structure and provides examples. It covers the essential information for an agent to invoke the tool correctly.

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?

Input schema has 100% coverage with descriptions for all parameters. Description adds examples and clarifies that body is for POST/PUT, but schema already covers that. Parameter descriptions are clear, so additional value is modest.

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 clearly states 'Execute a deployed function and return the real response' and provides examples showing usage for testing API endpoints, which is specific and distinguishes from siblings like 'run_code' or 'execute_sql'.

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 description explicitly says 'Always run_function on your API endpoints after writing them' and instructs to inspect response body to match frontend, which provides clear context for when to use this tool, though it doesn't explicitly mention when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Woobox/hatchable-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server