Skip to main content
Glama

check_session

Retrieve session details including elapsed time for active sessions in behavioral tracking systems like meditation or exercise logs.

Instructions

Get details for a single session, including elapsed_sec if active. Free (0 credits).

Args:
    ak_id: The session ID to look up.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ak_idYes

Implementation Reference

  • server.py:70-79 (handler)
    The check_session tool handler that retrieves session details by ak_id. Makes a GET request to /sessions/{ak_id} endpoint and returns the JSON response.
    @mcp.tool()
    def check_session(ak_id: int) -> dict:
        """Get details for a single session, including elapsed_sec if active. Free (0 credits).
    
        Args:
            ak_id: The session ID to look up.
        """
        with _client() as client:
            response = client.get(f"/sessions/{ak_id}")
        return response.json()
  • server.py:70-71 (registration)
    Tool registration using @mcp.tool() decorator that registers check_session as an available MCP tool.
    @mcp.tool()
    def check_session(ak_id: int) -> dict:
  • Helper function that creates an httpx client with configured base URL and headers, used by check_session to make API requests.
    def _client() -> httpx.Client:
        return httpx.Client(base_url=MG_BASE_URL, headers=HEADERS, timeout=30)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context: it's free (0 credits), includes elapsed_sec for active sessions, and specifies a single session lookup. However, it doesn't cover other behavioral aspects like error handling, response format, or whether it's read-only (implied but not stated).

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 appropriately sized and front-loaded: the first sentence states the purpose and key details (elapsed_sec, free), and the second sentence documents the parameter. Every sentence earns its place with no wasted words, making it efficient and easy to parse.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter, no annotations, no output schema), the description is somewhat complete but has gaps. It covers the purpose, cost, and parameter semantics, but lacks details on output format, error cases, or how it integrates with siblings. For a simple lookup tool, this is adequate but not fully comprehensive.

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 description adds meaning beyond the input schema, which has 0% coverage. It explains that ak_id is 'The session ID to look up,' providing clear semantics. Since there's only one parameter and the schema lacks descriptions, the description effectively compensates, though it could add more detail like format or examples.

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 description clearly states the tool's purpose: 'Get details for a single session, including elapsed_sec if active.' It specifies the verb ('Get details') and resource ('a single session'), distinguishing it from siblings like list_sessions (which lists multiple sessions) and start/stop_session (which modify sessions). However, it doesn't explicitly differentiate from get_stats, which might overlap in functionality.

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?

The description implies usage by specifying 'a single session' and providing the required parameter (ak_id), suggesting it's for retrieving details of a specific session. However, it lacks explicit guidance on when to use this tool versus alternatives like list_sessions (for multiple sessions) or get_stats (for broader statistics), and does not mention prerequisites or exclusions.

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/thunderrabbit/jikan'

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