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 }; }

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