Skip to main content
Glama
KallistoX

mcp-unifi-applications

Get Example

get_example
Read-onlyIdempotent

Retrieve a runnable API request example for any UniFi endpoint in your chosen language and mode, with placeholders to fill in. Get authoritative code samples directly from Ubiquiti's documentation.

Instructions

Get a runnable request for one endpoint, in one language, as published by Ubiquiti.

Returns a heading naming the endpoint, language and mode, followed by a single code block. The request shape is authoritative; host addresses, site ids and API keys are placeholders to fill in. Bodies show the schema's default values, not a worked example — combine with get_endpoint or get_field_schema when the payload matters. If the requested language and mode pair does not exist, the reply lists the pairs that do instead of failing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo'local' addresses the console directly (https://<console-ip>/proxy/…); 'remote' goes through the UniFi cloud API (api.ui.com). Defaults to 'local', except for the cloud-only applications — site-manager, mobility and carrier-fabric — which have no local form and default to 'remote'.
slugYesEndpoint identifier, app-qualified or bare when unambiguous.
languageNoOne of curl, go, nodejs, python, ansible.curl

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.1
    • changedInput schema / properties / language / description
      Previous value: -"Programming language — one of: curl, go, nodejs, python, ansible."New value: +"One of curl, go, nodejs, python, ansible."
    • changedInput schema / properties / mode / description
      Previous value: -"'local' (direct console access) or 'remote' (via cloud API).\n  Defaults to 'local'; remote-only apps (site-manager, mobility,\n  carrier-fabric) default to 'remote'."New value: +"'local' addresses the console directly (https://<console-ip>/proxy/…);\n  'remote' goes through the UniFi cloud API (api.ui.com). Defaults to\n  'local', except for the cloud-only applications — site-manager,\n  mobility and carrier-fabric — which have no local form and default to\n  'remote'."
    • changedInput schema / properties / slug / description
      Previous value: -"Endpoint identifier (e.g. 'network/createnetwork')."New value: +"Endpoint identifier, app-qualified or bare when unambiguous."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, and non-destructive hints. The description adds valuable behavioral context: it describes the return format (heading + single code block), clarifies that placeholders (host addresses, site ids, API keys) are to be filled in, and notes that bodies use schema default values. This goes beyond annotations and gives the agent a clear picture of what to expect.

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?

The description is three sentences, front-loaded with the core purpose, then adding necessary context and usage guidance. There is no fluff or repetition. Every sentence earns its place: the first states the function, the second describes the response format and placeholders, the third covers usage and error handling.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists (per context signal), the description need not detail the full response structure. It covers the essential aspects: what the tool returns, how placeholders work, how to handle the payload case, and what happens on invalid pairs. It also names alternative tools for when this one is insufficient. The tool is simple and the description is complete for an agent to call it 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?

The input schema has 100% coverage with clear descriptions for all three parameters (slug, language, mode), so the baseline is 3. The description mentions language and mode indirectly (e.g., 'in one language' and the error condition on language/mode pairs) but does not add significant new meaning about parameter syntax or valid values beyond what the schema already provides. It adds context about how parameters affect the output but not enough to justify a higher score.

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 precise statement: 'Get a runnable request for one endpoint, in one language, as published by Ubiquiti.' This identifies the exact verb, resource, and scoping (one endpoint, one language). It clearly differentiates from siblings like get_response_sample (which likely returns a sample response) and get_endpoint (which likely returns the endpoint definition) by focusing on the runnable request.

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?

The description gives explicit when-to-use guidance: 'Bodies show the schema's default values, not a worked example — combine with get_endpoint or get_field_schema when the payload matters.' This tells the agent to use alternative tools when the payload is important. It also explains the error behavior: 'If the requested language and mode pair does not exist, the reply lists the pairs that do instead of failing,' which clarifies what happens on invalid input.

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