Skip to main content
Glama

get_network_activity

Retrieve captured network requests and responses to analyze web traffic during debugging sessions, with options to filter by request type and clear history.

Instructions

Recupera todas as requisições de rede capturadas

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNoLimpar histórico após recuperação
filterTypeNoFiltrar por tipoall

Implementation Reference

  • The handler function that executes the get_network_activity tool logic: casts args to GetNetworkActivityArgs, filters networkRequests from browserState by type if specified, optionally clears the requests, and returns a JSON-formatted result with count and requests list.
    export async function handleGetNetworkActivity(args: unknown): Promise<ToolResponse> {
      const typedArgs = args as unknown as GetNetworkActivityArgs;
      const { filterType = 'all', clear = false } = typedArgs;
    
      let activity = browserState.networkRequests;
      if (filterType !== 'all') {
        activity = activity.filter((req) => req.type === filterType);
      }
    
      const result = {
        count: activity.length,
        requests: activity,
      };
    
      if (clear) {
        clearNetworkRequests();
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • TypeScript interface defining the input arguments for the get_network_activity tool: optional filterType (all/request/response) and clear boolean.
    export interface GetNetworkActivityArgs {
      filterType?: 'all' | 'request' | 'response';
      clear?: boolean;
    }
  • src/tools.ts:126-145 (registration)
    The tool registration object in the tools array, including name, description, and inputSchema matching the MCP tool specification.
    {
      name: 'get_network_activity',
      description: 'Recupera todas as requisições de rede capturadas',
      inputSchema: {
        type: 'object',
        properties: {
          filterType: {
            type: 'string',
            enum: ['all', 'request', 'response'],
            description: 'Filtrar por tipo',
            default: 'all',
          },
          clear: {
            type: 'boolean',
            description: 'Limpar histórico após recuperação',
            default: false,
          },
        },
      },
    },
  • src/index.ts:89-90 (registration)
    Dispatch case in the main tool handler switch statement that routes calls to get_network_activity to the handleGetNetworkActivity function.
    case 'get_network_activity':
      return await handleGetNetworkActivity(args);
  • src/index.ts:15-15 (registration)
    Import of the handleGetNetworkActivity handler function from browserTools.js in the main index file.
    handleGetNetworkActivity,
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'recupera' implies a read operation, it doesn't address whether this requires specific browser states, what format the data returns in, whether it's paginated, or if there are rate limits. The 'clear' parameter suggests destructive potential, but this isn't highlighted in the description.

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 a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a tool with only two parameters and good schema documentation.

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?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'captured network requests' entails, what data format to expect, or how this tool relates to the browser automation context suggested by sibling tools. The agent lacks crucial context about what this tool actually returns.

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

Parameters3/5

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

With 100% schema description coverage, the schema already documents both parameters thoroughly. The description adds no additional parameter context beyond what's in the schema - it doesn't explain what 'captured network requests' means in relation to the filterType options or clarify the implications of the clear parameter.

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 'Recupera todas as requisições de rede capturadas' clearly states the verb ('recupera' - retrieves) and resource ('requisições de rede capturadas' - captured network requests), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like get_console_logs or get_cookies, which also retrieve different types of browser data.

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?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, timing considerations, or comparison to sibling tools that might retrieve related browser data. The agent must infer usage from the tool name alone.

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/EmmanuelBarbosaMonteiro/mcp-server-browser'

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