Skip to main content
Glama
smallest-inc

Smallest MCP Server

Official
by smallest-inc

set_pre_call_api

Configure an automatic HTTP request that runs before each call to enrich the agent with external data. Extract response values into variables for use in prompts and messages.

Instructions

Configure (or disable) an agent's pre-call API. This is an HTTP request the platform makes automatically BEFORE the call connects — typically to enrich the agent with data, e.g. look up a customer record by phone number. Values extracted via response_variables become {{variables}} you can reference in the prompt and first message. This is different from add_agent_tool: a pre-call API always runs once before the call and is not chosen by the LLM, whereas an api_call tool is invoked by the agent during the conversation. There is exactly one pre-call API per agent (this replaces it). For versioned agents the change is saved as a draft — pass draft_id to stack onto an existing draft, then publish_draft to make it live.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe agent ID to configure
draft_idNoExisting draft to write into (stacks this change onto the draft's other edits). Omit to create a new draft from the live version.
enabledNoEnable the pre-call API (default true). Pass false to disable it while keeping the saved config.
urlNoEndpoint URL. Required when enabling. May contain {{variable}} placeholders (e.g. system variables like {{from_number}}).
methodNoHTTP method. Default GET.
headersNoRequest headers as key/value pairs. Values may contain {{variable}} placeholders.
bodyNoRequest body as a JSON object (for POST/PUT/PATCH). Values may contain {{variable}} placeholders.
query_paramsNoURL query parameters as key/value pairs. Values may contain {{variable}} placeholders.
timeout_secsNoRequest timeout in seconds (1-30). Default 5. Note: seconds, not milliseconds.
response_variablesNoExtract values from the API response into variables usable in the prompt and first message.
Behavior4/5

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

No annotations provided, so description fully carries burden. It discloses the pre-call behavior, replacement nature, and draft workflow, but lacks details on error handling, authentication, or what happens when disabled.

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?

Concise with no wasted words, front-loaded with purpose, then differentiation, then versioning nuance. Every sentence earns its place.

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?

Covers workflow, purpose, key parameters, and differentiation well, but missing explanation of return values or success confirmation (no output schema exists). Still sufficient for a configuration tool.

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?

Despite 100% schema coverage, the description adds meaning beyond schema by explaining response_variables create template variables and url/headers/body accept placeholders, aiding correct usage.

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 specifies the verb 'configure (or disable)' and the resource 'agent's pre-call API', clearly distinguishing it from the sibling tool 'add_agent_tool' by explaining the difference in invocation timing and LLM involvement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicit guidance on when to use (enrich agent with data before call) vs when not (use add_agent_tool for LLM-chosen calls), and how to handle versioning with draft_id and publish_draft.

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/smallest-inc/mcp-server'

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