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)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_context"
}
}Input 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 = {};