Skip to main content
Glama
tool.go974 B
package gadgets import ( "github.com/mark3labs/mcp-go/mcp" "github.com/mark3labs/mcp-go/server" "github.com/inspektor-gadget/ig-mcp-server/pkg/gadgetmanager" ) func GetTool(mgr gadgetmanager.GadgetManager) server.ServerTool { return server.ServerTool{ Tool: lifecycleTool(), Handler: lifecycleHandler(mgr), } } func lifecycleTool() mcp.Tool { return mcp.NewTool( toolName, mcp.WithDescription("Manage running gadgets"), mcp.WithReadOnlyHintAnnotation(true), mcp.WithString("action", mcp.Description("Lifecycle action to perform: "+ actionListGadgets+"(list running gadgets), "+ actionStopGadget+"(stop a running gadget using its ID), "+ actionGetResults+"(get results of a running gadget using its ID, only available before stopping it)"), mcp.Enum(gadgetActions...), ), mcp.WithString("gadget_id", mcp.Description("ID of the gadget to stop or get results from, required for "+actionStopGadget+" and "+actionGetResults)), ) }

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/inspektor-gadget/ig-mcp-server'

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