Skip to main content
Glama

test

Debug Go tests in a package using the Delve debugger to identify and resolve issues in test execution.

Instructions

Debug tests in a package

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageNoPackage to test (defaults to current directory)
testFlagsNoFlags to pass to go test

Implementation Reference

  • Handler function for the 'test' tool: extracts parameters, calls startDebugSession with test flags, and returns session info.
    case "test": { const pkg = (args?.package as string) || "."; const testFlags = (args?.testFlags as string[]) || []; const session = await startDebugSession("test", pkg, ["--", ...testFlags]); return { content: [{ type: "text", text: `Started test debug session ${session.id} for package ${pkg}` }] };
  • Schema definition for the 'test' tool, including input parameters for package and testFlags.
    { name: "test", description: "Debug tests in a package", inputSchema: { type: "object", properties: { package: { type: "string", description: "Package to test (defaults to current directory)" }, testFlags: { type: "array", items: { type: "string" }, description: "Flags to pass to go test" } } } },
  • src/server.ts:406-407 (registration)
    Registration and dispatch logic for the 'test' tool in the CallToolRequestHandler, routing to handleDebugCommands.
    if (["debug", "attach", "exec", "test", "core", "dap", "replay", "trace"].includes(name)) { return handleDebugCommands(name, args);

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/dwisiswant0/delve-mcp'

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