get_context
Retrieve current Fastly NGWAF context including corporation and site names to manage web application security configurations.
Instructions
Get the current context (corp and site names)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:878-885 (handler)Handler implementation for the 'get_context' tool within the CallToolRequestSchema switch statement. Returns the current default corporation and site names from the global context object.case 'get_context': result = { context: { defaultCorpName: context.defaultCorpName, defaultSiteName: context.defaultSiteName, }, }; break;
- server.js:430-436 (schema)Schema definition for the 'get_context' tool, specifying no input parameters required.name: 'get_context', description: 'Get the current context (corp and site names)', inputSchema: { type: 'object', properties: {}, }, },
- server.js:814-816 (registration)Registration of the ListToolsRequestSchema handler, which returns the tools array containing the 'get_context' tool definition.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
- server.js:358-358 (helper)Global context object that persists the defaultCorpName and defaultSiteName values retrieved by the 'get_context' tool.let context = {};