Skip to main content
Glama

core

Analyze core dump files generated by Go programs to diagnose crashes and debugging issues. Provide executable and core dump paths for detailed insights into program errors.

Instructions

Examine a core dump

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
corePathYesPath to the core dump file
executableYesPath to the executable that produced the core dump

Implementation Reference

  • The handler logic for the 'core' tool, which starts a debug session using startDebugSession with type 'core', the executable path, and core dump path as arguments. Returns a confirmation message.
    case "core": { const { executable, corePath } = args; const session = await startDebugSession("core", executable, [corePath]); return { content: [{ type: "text", text: `Started core dump analysis session ${session.id} for ${executable} with core ${corePath}` }] }; }
  • Input schema definition for the 'core' tool, specifying required parameters 'executable' and 'corePath'.
    name: "core", description: "Examine a core dump", inputSchema: { type: "object", properties: { executable: { type: "string", description: "Path to the executable that produced the core dump" }, corePath: { type: "string", description: "Path to the core dump file" } }, required: ["executable", "corePath"] } },
  • src/server.ts:406-408 (registration)
    Tool dispatch registration: routes 'core' tool calls to the handleDebugCommands function.
    if (["debug", "attach", "exec", "test", "core", "dap", "replay", "trace"].includes(name)) { return handleDebugCommands(name, args); }
  • Helper function that spawns the Delve debugger process with the given type ('core'), target (executable), and args (corePath). Constructs dlv command as 'dlv core --headless --listen=:<port> ... executable corePath'.
    export async function startDebugSession(type: string, target: string, args: string[] = []): Promise<DebugSession> { const port = await getAvailablePort(); const id = Math.random().toString(36).substring(7); const dlvArgs = [ type, "--headless", `--listen=:${port}`, "--accept-multiclient", "--api-version=2", target, ...args ]; const process = spawn("dlv", dlvArgs, { stdio: ["pipe", "pipe", "pipe"] }); const session: DebugSession = { id, type, target, process, port, breakpoints: new Map() }; sessions.set(id, session); return session; }
  • Type definition for DebugSession.type including 'core'.
    type: string; // 'debug' | 'attach' | 'exec' | 'test' | 'core' | 'replay' | 'trace' | 'dap'

Other Tools

Related Tools

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