feat(mcp): add structured tool metadata#657
Merged
Merged
Conversation
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
The CI lint gate (scripts/lint.sh --ci, clang-format-20) flagged 7 files whose new lines were not run through the project formatter. Reformat only those lines (line wrapping / continuation alignment) — no behavior change. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
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.
Summary
titleand broad objectoutputSchemafor every tool, and explicitly declaringcapabilities.tools.listChanged=falseduring initialization.tools/listcursor pagination withnextCursor, while keeping the internal all-tools list helper intact.structuredContentfor successful tool results whose text payload is a JSON object, while preserving the existing serialized JSON text block for backwards compatibility.notifications/cancelledhandling to cancel only whenparams.requestIdmatches the active JSON-RPC request id, including string ids.PATH.en/zhmessage catalog,Accept-Languagedetection,config set ui-lang, non-ASCII project-name encoding, optional index project-name override, custom path entry, root-drive buttons, folder filtering, keyboard navigation, and per-row quick indexing.Protocol Gap Analysis
Official MCP currently redirects
/specificationto version2025-11-25, marked latest:https://modelcontextprotocol.io/specification/2025-11-25
Implemented in this PR:
title,outputSchema, cursor-basedtools/listpagination, explicitisError, andstructuredContentfor JSON object results. This PR adds those without changing tool names or inputs:https://modelcontextprotocol.io/specification/2025-11-25/server/tools
notifications/cancelled.params.requestId; this PR stops cancelling unrelated active requests:https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/cancellation
Remaining gaps after this PR:
annotations,icons, or task execution metadata.Local Logging Design
CBM_LOG_FORMAT=text|jsonis explicit-only. Unset format env keeps the current local format.level,event, and caller-provided key/value fields.Graph UI Issue Analysis
Queried the open UX/UI/search issue set and targeted the highest stability and adoption blockers first.
Implemented in this PR:
CBM_UI_MAX_RENDER_NODES.Showing 2,000 of 43,729 nodes. Use filters to narrow.codebase-memory-mcppath thatexeclcannot resolve. The UI server now resolves bareargv[0]throughPATHbefore spawning the index subprocess.en/zhchrome strings, detects Chinese viaAccept-Language, and supports a localui-langconfig override with no external translation or telemetry path.index_repositoryaccepts an optionalnameoverride for explicit project IDs.build/c/test-runner uiandbuild/c/test-runner httpd.Open follow-up areas intentionally left outside this PR:
Stability Impact
token=secretmust not appear in logs./api/ui-configreads local config and request headers, and the frontend uses a bundled local message catalog.Tests
make -B -j4 -f Makefile.cbm build/c/test-runnerafter mergingmainto refresh the LSP amalgamation object.make -j4 -f Makefile.cbm build/c/test-runnerbefore themainmerge.build/c/test-runner str_util fqn mcp ui clibuild/c/test-runner httpdoutside the sandbox because localhost bind is blocked in the sandbox.npm run testingraph-uinpm run buildingraph-ui(Vite emits the existing large chunk warning)build/c/test-runner | awk 'flag && /^=== str_util ===/{exit} /^=== log ===/{flag=1} flag{print}'build/c/test-runner | awk 'flag && /^=== language ===/{exit} /^=== mcp ===/{flag=1} flag{print}'build/c/test-runner | awk 'flag && /^=== security ===/{exit} /^=== httpd ===/{flag=1} flag{print}'outside the sandbox because localhost bind is blocked in the sandbox.clang-format --dry-run -Werror src/foundation/log.c src/foundation/log.h tests/test_log.c tests/test_httpd.cclang-format --dry-run -Werror -lines=416:438 tests/test_mcp.cgit diff --checkmake -j4 -f Makefile.cbm testcurrently fails outside this change with offline/graph-dump failures (4675 passed, 836 failed, includingpipeline.err phase=dump,no graph DB, andCould not resolve host: github.com).scripts/lint.shcurrently fails outside this change on existing clang-tidy findings in files such asinternal/cbm/cbm.c,src/store/store.c,src/watcher/watcher.c, andsrc/pipeline/pass_lsp_cross.h. The touched source formatting check passes.