Skip to main content
Glama
mcp-unifi-applications

mcp-unifi-applications

Get Example

get_example
Read-onlyIdempotent

Retrieve a runnable request example for a UniFi endpoint in a specified language and mode, including placeholders for host, site ID, and API key.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "slug": "<slug>"
    },
    "name": "get_example"
  }
}

Input 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

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.5.0
    • removedInput schema / properties / mode / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / mode / default
      Previous value: -nullNew value: +""
    • addedInput schema / properties / mode / type
      Added value: +"string"
  2. 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."
  3. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed world), and the description adds genuinely new behavior: exact return structure (heading then one code block), the caveat that host addresses, site ids and API keys are placeholders, that bodies show schema defaults rather than worked examples, and that a missing language/mode pair degrades gracefully instead of erroring.

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?

Front-loaded with the core verb and resource, then dense follow-ups with no filler; every sentence carries information (return shape, placeholder warning, default-values caveat, fallback). Slightly long at four sentences for a lookup tool, but nothing is redundant.

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?

For a three-parameter read-only lookup with a full output schema, the description covers what an agent needs before and after the call: what is fetched, what the answer looks like, what is a placeholder versus authoritative, and how to handle a bad language/mode pair.

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 coverage is 100% and the mode parameter's local/remote defaults and cloud-only exceptions are fully documented in the schema, so the baseline of 3 applies. The description adds only the framing that exactly one language and one mode are resolved per call, which is marginal but consistent with the schema.

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 first sentence gives a specific verb, resource and scope: a runnable *request* for one endpoint, in one language, distinguishing it implicitly from the response-shaped sibling get_response_sample. It also states the return shape (heading + single code block). What it doesn't do is explicitly contrast itself with get_response_sample or list_endpoints by name, so differentiation is inferable rather than stated.

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?

Strong conditional guidance: "combine with get_endpoint or get_field_schema when the payload matters" tells the agent exactly when this tool is insufficient, and the fallback behavior (listing available mode/language pairs rather than failing) is spelled out. It lacks an explicit when-not/alternative statement versus get_response_sample.

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