Skip to main content
Glama

设置断点

gdb_set_breakpoint

Set a breakpoint at a file:line or function name. Supports conditional expressions and temporary breakpoints to control execution flow.

Instructions

在指定位置设置断点,支持条件断点和临时断点。

参数:

  • location: 断点位置 (文件:行号 或 函数名)

  • condition (可选): 条件表达式,如 x>5, i==10

  • temporary (可选): 临时断点,触发后自动删除

示例:

  • gdb_set_breakpoint({location: "main.c:10"}) → 在main.c第10行设置断点

  • gdb_set_breakpoint({location: "factorial", condition: "n==0"}) → 条件断点

  • gdb_set_breakpoint({location: "main", temporary: true}) → 临时断点

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationYesBreakpoint location: file:line (e.g., main.c:10) or function name
conditionNoConditional expression, e.g., x>5, i==10
temporaryNoTemporary breakpoint (auto-delete after hit)
Behavior4/5

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

Annotations indicate readOnlyHint=false and destructiveHint=false, meaning the tool modifies state but is not destructive. The description adds context by explaining that temporary breakpoints auto-delete after hit, and that conditions can be set. This goes beyond the annotations.

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

Conciseness5/5

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

The description is concise, with a clear first sentence stating the purpose, followed by a structured parameter list and concrete examples. Every sentence adds value, no redundant text.

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

Completeness5/5

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

Given the tool has 3 parameters (one required), no output schema, and annotations, the description fully covers the tool's behavior, parameter formats, and use cases. It is complete for an agent to understand and invoke correctly.

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

Parameters4/5

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

Input schema has 100% coverage with descriptions for all parameters. The description adds examples showing valid formats (e.g., 'main.c:10', 'factorial', 'n==0') and clarifies optionality and default values (temporary defaults to false), providing meaning beyond the schema.

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

Purpose5/5

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

The description clearly states the tool sets a breakpoint at a specified location, supports conditional and temporary breakpoints. It distinguishes itself from sibling tools like gdb_list_breakpoints (listing) and gdb_delete_breakpoint (deletion) by focusing on setting breakpoints.

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

Usage Guidelines3/5

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

The description provides examples and parameter details but does not explicitly state when to use this tool versus alternatives (e.g., gdb_enable_breakpoint or gdb_set_condition). Usage is implied through examples, but no exclusions or context differentiation are given.

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/zjm1060/gdb-mcp'

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