Skip to main content
Glama
purpleax

Fastly NGWAF MCP Server

by purpleax

discover_environment

Explore available corporations and sites for authenticated users to manage web application security configurations through the Fastly NGWAF MCP Server.

Instructions

Discover available corporations and sites for the authenticated user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
corpNameNoSpecific corporation to explore (optional)

Implementation Reference

  • Handler logic for the 'discover_environment' tool. If a corpName argument is provided, it resolves the corporation and lists its sites using client.listSites(). Otherwise, it lists all accessible corporations using client.listCorps() and returns them.
    case 'discover_environment':
        if (typedArgs.corpName) {
            const { corpName } = resolveContext(typedArgs);
            const sites = await client.listSites(corpName);
            result = { corporation: corpName, sites };
        }
        else {
            const corps = await client.listCorps();
            result = { corporations: corps };
        }
        break;
  • Tool schema definition for 'discover_environment', specifying the input schema that accepts an optional corpName parameter.
    {
        name: 'discover_environment',
        description: 'Discover available corporations and sites for the authenticated user',
        inputSchema: {
            type: 'object',
            properties: {
                corpName: { type: 'string', description: 'Specific corporation to explore (optional)' },
            },
        },
    },
  • server.js:814-816 (registration)
    Registration of the tools list (including 'discover_environment') via the handler for ListToolsRequestSchema, which returns the complete tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
        return { tools };
    });
  • Helper function resolveContext used in the handler to determine corpName and siteName from arguments or global context.
    function resolveContext(args) {
        const corpName = args.corpName || context.defaultCorpName;
        const siteName = args.siteName || context.defaultSiteName;
        if (!corpName) {
            throw new Error('Corporation name is required. Please set context or provide corpName parameter.');
        }
        return { corpName, siteName };
    }
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. It states it's for discovery and mentions authentication, but lacks details on return format (e.g., structure, pagination), performance (e.g., speed, limits), or side effects (e.g., caching). For a tool with no annotation coverage, this is a significant gap in transparency about how it behaves beyond its basic purpose.

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, clear sentence that efficiently conveys the tool's core function without unnecessary words. It's front-loaded with the main action ('Discover') and resources, making it easy to parse. Every part of the sentence earns its place by specifying scope and authentication context.

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's moderate complexity (discovering multiple resource types), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'discover' entails (e.g., returns a list, details permissions), how results are structured, or handle edge cases. For a tool with no structured behavioral or output data, more context is needed to adequately guide an agent.

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?

The input schema has 100% description coverage, with one optional parameter 'corpName' documented as 'Specific corporation to explore (optional)'. The description adds no parameter details beyond what the schema provides, such as explaining how 'corpName' filters results or its format. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't enhance parameter understanding.

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: 'Discover available corporations and sites for the authenticated user.' It specifies the verb ('discover') and resources ('corporations and sites'), and distinguishes it from siblings like 'list_corps' or 'list_sites' by implying it returns both corporations and sites in one operation. However, it doesn't explicitly differentiate scope or format from those siblings, preventing a perfect score.

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 like 'list_corps' or 'list_sites'. It mentions 'for the authenticated user', which implies a prerequisite of authentication, but offers no explicit when/when-not instructions or comparisons to sibling tools. This leaves usage context largely implied rather than clearly defined.

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