Skip to main content
Glama

unw_session

Check UNW session authentication, cookie expiry, and state-file age before using other tools; get repair hints and the exact CLI command to fix an expired session.

Instructions

Check the UNW session: authenticated (live check), degraded (state exists but the live check failed), state-file age, cookie count and earliest cookie expiry (values are never exposed), plus read_hint/write_hint and the exact packaged CLI command that repairs an expired session. Call this before any other tool. If unauthenticated but degraded, try one read tool before asking for a login.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "unw_session"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the two-state model, that a live check is performed, that 'degraded' means the live check failed while state still exists, that secret values are never exposed, and that it surfaces the exact CLI command for repair. Left unstated are the cost/latency of the live network check and whether failures surface as errors or as a status value, which keeps it short of 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?

Front-loaded with the verb and the returned fields, then the operational rule ('call this first'), then the degraded-case branch. Four sentences, each carrying distinct information, with no restatement of the name or filler.

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?

There is no output schema, so the description must describe the return shape, and it does: the two states, the age/cookie/expiry fields, and the hint fields. For a zero-parameter read-only diagnostic this covers everything an agent needs to interpret the result and choose a next step.

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 tool takes zero parameters, so there is nothing for the description to disambiguate and the baseline of 4 applies. The description correctly presents this as a no-argument session probe rather than implying configuration options.

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?

States a specific verb and resource ('Check the UNW session') and enumerates exactly what the check reports: authenticated/degraded state, state-file age, cookie count, earliest expiry, read_hint/write_hint. That is enough for an agent to tell it apart from every sibling, which all operate on catalog/planning data rather than session state.

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?

Gives an explicit ordering rule ('Call this before any other tool') plus a conditional fallback path for the degraded case ('try one read tool before asking for a login'). This is genuine when-to-use and what-to-do-next guidance rather than implied context.

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