Skip to main content
Glama
sevaepsteyn

UniFi Internal API MCP Server

by sevaepsteyn

set_auth_token

Set or update the authentication token to resolve UniFi controller authentication failures or configure a missing token.

Instructions

Set or update the browser TOKEN cookie for authentication.

Use this when authentication fails or no token is configured. To get the token: log into the UniFi controller in a browser, open DevTools (Cmd+Option+I) > Application > Cookies, and copy the TOKEN value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesTOKEN cookie value from browser (JWT string starting with eyJ...)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries the transparency burden. It states the action and purpose, and even provides token acquisition instructions. However, it does not disclose potential side effects (e.g., whether an existing token is overwritten, whether the token is persisted across sessions, or if it requires specific permissions). This is sufficient for a simple tool but leaves some behavioral nuances unstated.

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 concise and front-loaded with the action and purpose. The subsequent instruction for obtaining the token is relevant and clearly structured. There is no fluff or redundant information.

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 simplicity, the description is complete: it states the purpose, provides usage criteria, and includes token acquisition steps. An output schema exists, so return values are not the description's responsibility. A minor gap is that it does not mention anything about session persistence or the token's lifespan, but this is not critical for correct invocation.

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?

The single parameter 'token' is already well-described in the schema (JWT string starting with eyJ...). The description adds meaningful context beyond the schema by instructing how to obtain the TOKEN value from the browser's DevTools, which helps the agent understand the real-world source of the value. This goes beyond the schema's formal description.

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 clearly states the tool's function with a specific verb ('Set or update') and resource ('browser TOKEN cookie for authentication'). It distinguishes this tool from the many list/stat siblings by focusing on a unique action.

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?

Explicit usage guidance is given: 'Use this when authentication fails or no token is configured.' This clearly indicates the appropriate context. It does not explicitly state when not to use it, but the condition is self-evident, and no alternative tools exist among siblings for auth token management.

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/sevaepsteyn/unifi_internal_api_mcp'

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