analyze_function
Sets a temporary breakpoint on a C++ function, then uses clangd to get its signature and references and GDB to retrieve local variables.
Instructions
Analyze a function using both GDB and LSP.
Sets a temporary breakpoint at the function, gets its signature and references from clangd, and retrieves local variables if the program is stopped there.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"gdb_session_id": "<gdb_session_id>",
"lsp_session_id": "<lsp_session_id>",
"function_name": "<function_name>"
},
"name": "analyze_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gdb_session_id | Yes | Active GDB session. | |
| lsp_session_id | Yes | Active LSP session for the project. | |
| function_name | Yes | Name of the function to analyze. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |