Skip to main content
Glama

APISIX-MCP

by api7
global-rule.ts730 B
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { CreateGlobalRuleSchema, UpdateGlobalRuleSchema } from "../schemas/plugin.js"; import makeAdminAPIRequest from "../utils/adminAPI.js"; const setupGlobalRuleTools = (server: McpServer) => { server.tool("create_global_rule", "Create a global rule", CreateGlobalRuleSchema.shape, async (args) => { return await makeAdminAPIRequest(`/global_rules/${args.id}`, "PUT", args); }); server.tool("update_global_rule", "Update specific attributes of an existing global rule", UpdateGlobalRuleSchema.shape, async (args) => { return await makeAdminAPIRequest(`/global_rules/${args.id}`, "PATCH", args); }); }; export default setupGlobalRuleTools;

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/api7/apisix-mcp'

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