Skip to main content
Glama
purpleax

Fastly NGWAF MCP Server

by purpleax

search_requests

Search web application firewall requests using advanced filters to identify security events and analyze traffic patterns.

Instructions

Search requests with advanced filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
corpNameNoCorporation name (uses context default if not provided)
siteNameNoSite name (uses context default if not provided)
queryNoSearch query (e.g., "tag:SQLI")
pageNoPage number
limitNoResults per page

Implementation Reference

  • Handler logic for the 'search_requests' tool within the CallToolRequestHandler switch statement. It resolves the corpName and siteName using resolveContext, validates that siteName is provided, and calls the client's searchRequests method with the parameters.
    case 'search_requests':
        const { corpName: corpForSearch, siteName: siteForSearch } = resolveContext(typedArgs);
        if (!siteForSearch) {
            throw new Error('Site name is required. Please set context or provide siteName parameter.');
        }
        result = await client.searchRequests(corpForSearch, siteForSearch, typedArgs.query, typedArgs.page, typedArgs.limit);
        break;
  • Input schema definition for the 'search_requests' tool, specifying parameters like corpName, siteName, query, page, and limit with types and descriptions.
    inputSchema: {
        type: 'object',
        properties: {
            corpName: { type: 'string', description: 'Corporation name (uses context default if not provided)' },
            siteName: { type: 'string', description: 'Site name (uses context default if not provided)' },
            query: { type: 'string', description: 'Search query (e.g., "tag:SQLI")' },
            page: { type: 'number', description: 'Page number' },
            limit: { type: 'number', description: 'Results per page' },
        },
    },
  • server.js:629-642 (registration)
    Tool registration entry in the tools array, which is returned by the ListToolsRequestHandler, including name, description, and inputSchema.
    {
        name: 'search_requests',
        description: 'Search requests with advanced filtering',
        inputSchema: {
            type: 'object',
            properties: {
                corpName: { type: 'string', description: 'Corporation name (uses context default if not provided)' },
                siteName: { type: 'string', description: 'Site name (uses context default if not provided)' },
                query: { type: 'string', description: 'Search query (e.g., "tag:SQLI")' },
                page: { type: 'number', description: 'Page number' },
                limit: { type: 'number', description: 'Results per page' },
            },
        },
    },
  • Core helper method in FastlyNGWAFClient class that performs the actual API request to search requests for a site, building query parameters and calling the Fastly NGWAF API endpoint.
    async searchRequests(corpName, siteName, query, page, limit) {
        const params = new URLSearchParams();
        if (query)
            params.append('q', query);
        if (page)
            params.append('page', page.toString());
        if (limit)
            params.append('limit', limit.toString());
        const response = await this.api.get(`/corps/${corpName}/sites/${siteName}/requests?${params.toString()}`);
        return response.data;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Search requests with advanced filtering' implies a read-only operation but doesn't specify pagination behavior (implied by page/limit parameters), rate limits, authentication requirements, or what constitutes 'advanced filtering' beyond the parameters. The description is too vague about operational behavior.

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 with zero wasted words. It's appropriately sized for a search tool and front-loads the core functionality. Every word ('search', 'requests', 'advanced filtering') contributes essential information.

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 search tool with 5 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what constitutes a 'request' in this context, what format results return, how pagination works, or what 'advanced filtering' entails beyond the parameter names. The description leaves too many operational questions unanswered.

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?

Schema description coverage is 100%, so all parameters are documented in the schema itself. The description mentions 'advanced filtering' which aligns with the query parameter but doesn't add meaningful semantic context beyond what the schema already provides. No syntax examples or filtering logic details are included in the description.

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 verb ('search') and resource ('requests'), specifying 'advanced filtering' as a key capability. It distinguishes itself from siblings like 'list_events' or 'list_sites' by focusing on search functionality rather than simple listing. However, it doesn't explicitly differentiate from potential search alternatives that might exist.

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. With siblings like 'list_events' and 'list_sites' available, there's no indication whether this tool is preferred for filtered searches or when basic listing would suffice. No prerequisites, exclusions, or comparative context is mentioned.

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/purpleax/FastlyMCP'

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