Skip to main content
Glama

Run a FreeSWITCH API command

freeswitch_api
Read-only

Execute FreeSWITCH API commands through the event socket and return raw output, with read-only inspection enforced by default and write access enabled through configuration.

Instructions

Run a command through the FreeSWITCH event socket and return its raw output. In the default read-only mode only inspection commands such as 'status', 'show' and 'sofia status' are permitted. Set PBX_MCP_ALLOW_WRITE=true to lift that restriction.

Input Schema

NameRequiredDescriptionDefault
commandYesThe API command, for example 'show calls' or 'sofia status gateway mytrunk'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.4
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.1

TDQS

A4/5.0
Behavior4/5

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

Annotations cover the safety profile, but the description adds the conditional write-gate behavior (env var opt-in) that the static readOnlyHint cannot express, plus the fact that output is raw/unparsed. It does not mention error formats or payload size limits, which keeps it below a 5.

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 short sentences, zero waste, with the core action and return value front-loaded ahead of the permission caveat. 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?

For a single open-ended string parameter with no output schema, the description covers the essential unknowns: it is a pass-through to the event socket, output is raw, and a permission gate may cause rejection. Only the failure/timeout behavior is left unaddressed.

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?

Schema description coverage is 100% and the schema already supplies concrete examples ('show calls', 'sofia status gateway mytrunk'), so the description need not document the single parameter. It adds nothing about the command string's syntax or quoting that the schema lacks, so baseline 3 applies.

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?

States a specific verb and resource ('Run a command through the FreeSWITCH event socket') plus the return characteristic ('raw output'). It is distinguishable from the narrower siblings like freeswitch_status or freeswitch_channels as the generic escape hatch, though it never names them explicitly.

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?

Adds a real usage rule: in the default read-only mode only inspection commands such as 'status', 'show', 'sofia status' are permitted, and PBX_MCP_ALLOW_WRITE=true lifts the restriction. That tells the agent when a call will be rejected, but it doesn't route the agent to the specific-purpose siblings when those would be more appropriate.

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