Skip to main content
Glama

start_session

Initiate a new behavioral tracking session for meditation, focus, or exercise activities. Records timestamps automatically and returns a session ID for future management.

Instructions

Start a new behavioral session. Costs 1 credit.

The server records the current time automatically — the agent does not
need to track time. Returns the new session including its ak_id, which
you need to stop or check the session later.

Args:
    activity_id: Activity type ID (default 1 = Meditation).
                 Use list_activities to see all options.
    timezone: IANA timezone name, e.g. 'Asia/Tokyo' (default UTC).
    intended_sec: Planned duration in seconds (default 0 = open-ended).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activity_idNo
timezoneNoUTC
intended_secNo

Implementation Reference

  • server.py:27-52 (handler)
    The start_session tool handler function decorated with @mcp.tool(). This function starts a new behavioral session by making a POST request to the /sessions endpoint with activity_id, timezone, and intended_sec parameters. Returns the session data including ak_id.
    @mcp.tool()
    def start_session(
        activity_id: int = 1,
        timezone: str = "UTC",
        intended_sec: int = 0,
    ) -> dict:
        """Start a new behavioral session. Costs 1 credit.
    
        The server records the current time automatically — the agent does not
        need to track time. Returns the new session including its ak_id, which
        you need to stop or check the session later.
    
        Args:
            activity_id: Activity type ID (default 1 = Meditation).
                         Use list_activities to see all options.
            timezone: IANA timezone name, e.g. 'Asia/Tokyo' (default UTC).
            intended_sec: Planned duration in seconds (default 0 = open-ended).
        """
        payload = {
            "activity_id": activity_id,
            "timezone": timezone,
            "intended_sec": intended_sec,
        }
        with _client() as client:
            response = client.post("/sessions", json=payload)
        return response.json()
  • server.py:27-27 (registration)
    Tool registration using @mcp.tool() decorator on the start_session function, which registers it with the FastMCP server instance.
    @mcp.tool()
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it costs 1 credit, automatically records time, returns an ak_id needed for future operations, and has default values for all parameters. It doesn't mention error conditions or rate limits.

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?

Perfectly structured with purpose statement first, cost disclosure second, behavioral details third, and parameter explanations in a clear Args section. Every sentence earns its place with no wasted words.

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 creation tool with no annotations and no output schema, the description is quite complete - covering purpose, cost, behavior, and all parameters. It could mention what happens if the session fails to start or provide more detail about the return format beyond 'including its ak_id'.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining all three parameters: activity_id (with default and reference to list_activities), timezone (with format example and default), and intended_sec (with meaning of default value). This adds substantial meaning beyond the bare schema.

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 verb 'Start' and resource 'new behavioral session', distinguishing it from sibling tools like 'stop_session' or 'check_session'. It specifies this creates a new session with a unique identifier (ak_id) needed for later operations.

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?

The description provides clear context about when to use this tool (to begin a session) and references 'list_activities' for activity options, but doesn't explicitly state when NOT to use it or compare it directly to alternatives like 'create_activity'.

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