Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

release/21.x: [lldb] Document MCP tools & resources (#148708)#149146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tru merged 1 commit intollvm:release/21.xfromllvmbot:issue149145
Jul 17, 2025

Conversation

llvmbot
Copy link
Member

Backporte8dc96d

Requested by:@JDevlieghere

@llvmbot
Copy link
MemberAuthor

@JDevlieghere What do you think about merging this PR to the release branch?

@llvmbot
Copy link
MemberAuthor

@llvm/pr-subscribers-lldb

Author: None (llvmbot)

Changes

Backporte8dc96d

Requested by: @JDevlieghere


Full diff:https://github.com/llvm/llvm-project/pull/149146.diff

1 Files Affected:

  • (modified) lldb/docs/use/mcp.md (+63-1)
diff --git a/lldb/docs/use/mcp.md b/lldb/docs/use/mcp.mdindex 375c164fe771c..b7474246b54f3 100644--- a/lldb/docs/use/mcp.md+++ b/lldb/docs/use/mcp.md@@ -75,7 +75,69 @@ Configuration example for [Visual Studio Code](https://code.visualstudio.com/doc } ```-### Troubleshooting+## Tools++Tools are a primitive in the Model Context Protocol that enable servers to+expose functionality to clients.++LLDB's MCP integration exposes one tool, named `lldb_command` which allows the+model to run the same commands a user would type in the LLDB command+interpreter. It takes two arguments:++1. The unique debugger ID as a number.+2. The command and its arguments as a string.++## Resources++Resources are a primitive in the Model Context Protocol that allow servers to+expose content that can be read by clients.++LLDB's MCP integration exposes a resource for each debugger and target+instance. Debugger resources are accessible using the following URI:++```+lldb://debugger/<debugger id>+```++Example output:++```json+{+  "contents": [+    {+      "uri": "lldb://debugger/1",+      "mimeType": "application/json",+      "text": "{\"debugger_id\":1,\"name\":\"debugger_1\",\"num_targets\":1}"+    }+  ]+}+```++Debuggers can contain one or more targets, which are accessible using the+following URI:++```+lldb://debugger/<debugger id>/target/<target idx>+```++Example output:++```json+{+  "contents": [+    {+      "uri": "lldb://debugger/1/target/0",+      "mimeType": "application/json",+      "text": "{\"arch\":\"arm64-apple-macosx26.0.0\",\"debugger_id\":1,\"dummy\":false,\"path\":\"/bin/count\",\"platform\":\"host\",\"selected\":true,\"target_idx\":0}"+    }+  ]+}+```++Note that unlike the debugger id, which is unique, the target index is not+stable and may be reused when a target is removed and a new target is added.++## Troubleshooting  The MCP server uses the `Host` log channel. You can enable logging with the `log enable` command.

@JDevlieghere
Copy link
Member

@JDevlieghere What do you think about merging this PR to the release branch?

Sounds good to me, but let's hear from@DavidSpickett who suggested the backport.

@DavidSpickett
Copy link
Collaborator

Sounds good to me

<spiderman pointing meme>

let's hear from@DavidSpickett who suggested the backport.

It's true the vast majority of people will go to the website no matter what, but I consider documentation part of a feature and this completes the MCP feature for 21 so I'd like it to be included.

@tru
Copy link
Collaborator

tru commentedJul 17, 2025

I am always happy to merge release notes and documentation :)

Add documentation for the tools and resources exposed by LLDB's MCPserver.(cherry picked from commite8dc96d)
@trutru merged commit38158a9 intollvm:release/21.xJul 17, 2025
1 check was pending
@github-project-automationgithub-project-automationbot moved this fromNeeds Triage toDone inLLVM Release StatusJul 17, 2025
@trutru deleted the issue149145 branchJuly 17, 2025 10:41
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JDevlieghereJDevlieghereAwaiting requested review from JDevlieghereJDevlieghere is a code owner

@DavidSpickettDavidSpickettAwaiting requested review from DavidSpickett

Assignees
No one assigned
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants
@llvmbot@JDevlieghere@DavidSpickett@tru

[8]ページ先頭

©2009-2025 Movatter.jp