Skip to main content
Glama

haldir_get_session

Retrieves a session's current state—remaining budget, scopes, TTL, and validity—so agents can verify access before making calls.

Instructions

Get a session's current state — remaining budget, scopes, TTL, validity.

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": {
      "session_id": "<session_id>"
    },
    "name": "haldir_get_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.3

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the content of the response (remaining budget, scopes, TTL, validity), which is real behavioral value, but it says nothing about permissions required, behavior for an expired/revoked/unknown session, or whether the read is side-effect free (TTL checks can trigger refresh).

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?

A single front-loaded sentence with a tight enumerated list of returned state; nothing is wasted and the key information leads.

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 one-parameter read tool with no output schema, naming the returned fields covers the biggest gap. The only material omission is documenting session_id and error conditions for stale or revoked sessions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is one required parameter, session_id, at 0% schema description coverage, and the description never mentions it — no format, provenance, or what happens when it is invalid. With the schema silent, the description should have compensated and does not.

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 ('Get a session') and enumerates the state fields returned (budget, scopes, TTL, validity), which separates it from haldir_create_session and haldir_revoke_session by implication. It stops short of explicitly naming a sibling, but an agent can tell this is the read/inspect operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer this is the tool for inspecting a session before acting on it. There is no explicit when-to-use or when-not guidance, and no pointer to alternatives such as haldir_revoke_session or haldir_check_permission for related questions.

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