Skip to main content
Glama

clear_session

Reset all tracked identifiers to start fresh with a new project or clear consistency tracking in the Pyrefly MCP server.

Instructions

Clear all tracked identifiers and start fresh.

Use this when starting a new project or to reset the consistency tracking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'clear_session' tool is defined as an MCP tool and clears the session tracker.
    @mcp.tool()
    async def clear_session(context: Context | None = None) -> dict[str, str]:
        """
        Clear all tracked identifiers and start fresh.
    
        Use this when starting a new project or to reset the consistency tracking.
        """
        session_tracker.clear()
        return {"status": "cleared", "message": "Session tracking has been reset"}
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 indicates this is a destructive/reset operation ('clear all', 'start fresh', 'reset'), which is valuable context. However, it doesn't specify what 'tracked identifiers' are, whether the action is reversible, or what happens after clearing (e.g., does it return confirmation?). The description adds some behavioral insight but leaves gaps.

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 extremely concise with only two sentences, both of which add clear value. The first states the core action, and the second provides usage context. There's no wasted text, and information is front-loaded appropriately.

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 (0 parameters, has output schema), the description is reasonably complete. It explains what the tool does and when to use it. With an output schema present, it doesn't need to detail return values. However, for a destructive operation with no annotations, it could benefit from more explicit warnings about irreversible effects or confirmation of success.

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 has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description appropriately doesn't discuss parameters, focusing instead on the tool's purpose and usage. This meets the baseline expectation for parameterless tools.

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 with specific verbs ('clear all tracked identifiers', 'start fresh') and identifies the resource being acted upon (tracked identifiers). It doesn't explicitly differentiate from siblings like 'list_identifiers' or 'track_identifier', but the action is distinct enough to understand its unique function.

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 for when to use this tool ('when starting a new project or to reset the consistency tracking'), which helps distinguish it from read-only siblings like 'check_consistency' or 'list_identifiers'. However, it doesn't explicitly state when NOT to use it or name specific alternatives, keeping it from a perfect score.

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/kimasplund/mcp-pyrefly'

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