Skip to main content
Glama

session_stats

Retrieve usage statistics for the current session to monitor web data requests and track activity within the Bright Data Web MCP server.

Instructions

Tell the user about the tool usage during this session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execute handler for session_stats tool. It uses debug_stats.tool_calls to generate a report of tool usage in the current session.
    execute: tool_fn('session_stats', async()=>{
        let used_tools = Object.entries(debug_stats.tool_calls);
        let lines = ['Tool calls this session:'];
        for (let [name, calls] of used_tools)
            lines.push(`- ${name} tool: called ${calls} times`);
        return lines.join('\n');
    }),
  • server.js:264-275 (registration)
    Registration of the 'session_stats' tool using server.addTool via the addTool helper function.
    addTool({
        name: 'session_stats',
        description: 'Tell the user about the tool usage during this session',
        parameters: z.object({}),
        execute: tool_fn('session_stats', async()=>{
            let used_tools = Object.entries(debug_stats.tool_calls);
            let lines = ['Tool calls this session:'];
            for (let [name, calls] of used_tools)
                lines.push(`- ${name} tool: called ${calls} times`);
            return lines.join('\n');
        }),
    });
  • Zod schema for parameters: empty object since no inputs required.
    parameters: z.object({}),
  • Global debug_stats object that tracks tool calls per session, used by the session_stats handler.
    let debug_stats = {tool_calls: {}, session_calls: 0, call_timestamps: []};
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'Tell the user about tool usage,' which suggests a read-only, informational output, but fails to disclose behavioral traits like what data is included (e.g., metrics, timestamps), format of output, or any side effects. This is inadequate for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, straightforward sentence with no wasted words, making it appropriately concise. However, it's under-specified rather than efficiently informative, slightly reducing its effectiveness, but it's not overly verbose or poorly structured.

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

Completeness2/5

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

Given the tool has no annotations, no output schema, and 0 parameters, the description is incomplete. It lacks details on what 'tool usage' entails, the output format, or how it integrates with the session context. For a tool in a server full of web scraping siblings, this leaves significant gaps in understanding its role and behavior.

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 absence of inputs. The description doesn't add parameter semantics, but with no parameters, the baseline is 4—it doesn't need to compensate, and the schema suffices.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Tell the user about the tool usage during this session' is vague and tautological—it essentially restates the tool name 'session_stats' without specifying what 'tool usage' means (e.g., counts, durations, errors) or what 'this session' refers to. It doesn't clearly distinguish from sibling tools, which are primarily web scraping/data extraction focused, making this tool's purpose ambiguous in context.

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

Usage Guidelines2/5

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

No explicit guidance is provided on when to use this tool versus alternatives. The description implies it's for session-related information, but it doesn't specify scenarios (e.g., monitoring, debugging, reporting) or prerequisites. Given the sibling tools are for web operations, this lack of context leaves the agent unsure about its application.

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/dsouza-anush/brightdata-mcp-heroku'

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