Add extra fields to MCP tools#21579
Open
zeroSteiner wants to merge 4 commits into
Open
Conversation
This was
linked to
issues
Jun 17, 2026
9e5bee8 to
88651f9
Compare
This was
unlinked from
issues
Jun 18, 2026
Contributor
|
Thanks @zeroSteiner , it looks good to me now. I tested with the MCP inspector tool and a LLM. I confirmed the new fields are correctly handled. One note unrelated to this PR, but regarding the underlying {
"port": 443,
"name": "othercms",
"parents": [ { "port": 443, "name": "https", "parents": [
{ "port": 443, "name": "ssl", "parents": [
{ "port": 443, "name": "tcp", "parents": [] } ] } ] } ]
},
{
"port": 443,
"name": "https",
"parents": [ { "port": 443, "name": "ssl", "parents": [
{ "port": 443, "name": "tcp", "parents": [] } ] } ]
},
{
"port": 443,
"name": "ssl",
"parents": [ { "port": 443, "name": "tcp", "parents": [] } ]
},
{
"port": 443,
"name": "tcp",
"parents": []
}I was thinking about returning only the service ID for children, the way the actual DB records are built with associations, and let the client (LLM) reconstruct the service chain: {
"SID": 1,
"port": 80,
"name": "othercms",
"parents": [ 2 ]
},
{
"SID": 2,
"port": 443,
"name": "https",
"parents": [ 3 ]
},
{
"SID": 3,
"port": 443,
"name": "ssl",
"parents": [ 4 ]
},
{
"SID": 4,
"port": 443,
"name": "tcp",
"parents": []
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds additional information to data returned through the MCP server.
Related Issue:
msf_service_infoandmsf_vulnerability_infoMCP Server tools to align with the new way services are reported #21401datafield to themsf_note_infoMCP Server tool to support JSON format #21400msf_credential_infoMCP Server tool #21397Breaking Changes
This is not a breaking change.
Reviewer Notes
Verification Steps
claude(the one used for testingUsing claude code, you can use the Ctrl+O key to show the IO from the MCP tool which is useful to verify the shape of the data. You can also ask Claude to just verify the fields look right too.
Test Evidence
Test evidence includes tests for features that were dropped in this PR due to them being added in #21247.
Environment
I used a Windows Server 2019 as a target to populate some data, otherwise everything else was local using Claude Code.
AI Usage Disclosure
Of course I used claude code to perform the tests. I also used claude to update the specs as necessary.
Pre-Submission Checklist
rubocopon new files with no new offenses (net new files only)msftidyon changed module files with no new offenses (modules only)msftidy_docson changed documentation files with no new offenses (documentation files only)documentation/modules(new modules only)lib/changes)