Skip to main content
Glama

evaluate

Evaluate expressions in the current scope during debugging sessions with Delve MCP. Input session ID and expression to analyze and debug Go code efficiently.

Instructions

Evaluate an expression in current scope

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exprYesExpression to evaluate
sessionIdYesID of the debug session

Implementation Reference

  • Executes the 'evaluate' tool by sending an 'Eval' command to the Delve debug session with the provided expression and returns the result as formatted JSON.
    case "evaluate": { const { expr } = args; const response = await sendDelveCommand(session, "Eval", { expr }); return { content: [{ type: "text", text: JSON.stringify(response.Variable, null, 2) }] }; }
  • Defines the input schema for the 'evaluate' tool, specifying required 'sessionId' and 'expr' parameters.
    inputSchema: { type: "object", properties: { sessionId: { type: "string", description: "ID of the debug session" }, expr: { type: "string", description: "Expression to evaluate" } }, required: ["sessionId", "expr"] } },
  • src/server.ts:251-269 (registration)
    Registers the 'evaluate' tool in the ListTools response, providing name, description, and input schema.
    { name: "evaluate", description: "Evaluate an expression in current scope", inputSchema: { type: "object", properties: { sessionId: { type: "string", description: "ID of the debug session" }, expr: { type: "string", description: "Expression to evaluate" } }, required: ["sessionId", "expr"] } }, // Advanced debug tools
  • src/server.ts:410-413 (registration)
    Registers the dispatch for 'evaluate' tool in the CallToolRequest handler, routing to handleControlCommands.
    // Control commands if (["setBreakpoint", "removeBreakpoint", "continue", "next", "step", "stepout", "variables", "evaluate"].includes(name)) { return handleControlCommands(name, args); }

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