Skip to main content
Glama

setBackend

Set the debugging backend to default, native, lldb, or rr for Go program debugging via Delve.

Instructions

Set the backend for debugging

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backendYesBackend to use (default, native, lldb, or rr)

Implementation Reference

  • The handler implementation for 'setBackend': validates the backend argument (must be one of 'default', 'native', 'lldb', 'rr'), sets the DELVE_BACKEND environment variable, and returns a success message.
    case "setBackend": {
      const { backend } = args;
      if (!["default", "native", "lldb", "rr"].includes(backend)) {
        throw new Error("Invalid backend specified");
      }
    
      process.env.DELVE_BACKEND = backend;
      return {
        content: [{
          type: "text",
          text: `Set Delve backend to ${backend}`
        }]
      };
    }
  • src/server.ts:349-397 (registration)
    The tool registration in ListToolsRequestSchema: defines name 'setBackend', description, and inputSchema with a 'backend' enum property (required).
          // Configuration tools
          {
            name: "version",
            description: "Get Delve version information",
            inputSchema: {
              type: "object",
              properties: {}
            }
          },
          {
            name: "setBackend",
            description: "Set the backend for debugging",
            inputSchema: {
              type: "object",
              properties: {
                backend: {
                  type: "string",
                  description: "Backend to use (default, native, lldb, or rr)",
                  enum: ["default", "native", "lldb", "rr"]
                }
              },
              required: ["backend"]
            }
          },
          {
            name: "configureLogging",
            description: "Configure debug logging",
            inputSchema: {
              type: "object",
              properties: {
                components: {
                  type: "array",
                  items: {
                    type: "string",
                    enum: ["debugger", "gdbwire", "lldbout", "debuglineerr", "rpc", "dap", "fncall", "minidump", "stack"]
                  },
                  description: "Components to enable logging for"
                },
                destination: {
                  type: "string",
                  description: "Log destination (file path or file descriptor)"
                }
              },
              required: ["components"]
            }
          }
        ]
      };
    });
  • src/server.ts:402-421 (registration)
    The CallToolRequestSchema dispatcher: routes 'setBackend' calls to handleConfigCommands handler.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      // Debug commands
      if (["debug", "attach", "exec", "test", "core", "dap", "replay", "trace"].includes(name)) {
        return handleDebugCommands(name, args);
      }
    
      // Control commands
      if (["setBreakpoint", "removeBreakpoint", "continue", "next", "step", "stepout", "variables", "evaluate"].includes(name)) {
        return handleControlCommands(name, args);
      }
    
      // Configuration commands
      if (["setBackend", "configureLogging", "version"].includes(name)) {
        return handleConfigCommands(name, args);
      }
    
      throw new Error("Unknown tool");
    });
  • The DebugSession interface includes an optional 'backend' field, which is set via the setBackend tool.
    export interface DebugSession {
      id: string;
      type: string; // 'debug' | 'attach' | 'exec' | 'test' | 'core' | 'replay' | 'trace' | 'dap'
      target: string;
      process?: ChildProcess;
      port: number;
      breakpoints: Map<number, Breakpoint>;
      logOutput?: string[];
      backend?: string;
    }
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose any behavioral traits such as persistence, side effects, or permissions. The description is too brief to inform the agent beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that contains the essential purpose. It is front-loaded and wastes no words, though it could be slightly more informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description covers the bare minimum but lacks explanation of what 'backend' means or the effect of the change, making it incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the parameter already has an enum and description. The description adds no additional meaning beyond what the schema provides, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'set' and the resource 'backend', with context 'for debugging'. It distinguishes from sibling tools that involve other debugging operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance ('for debugging') but does not specify when to use this tool versus alternatives like debug or dap. No when-not-to-use or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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