Skip to content

Support MCP resource listing#882

Merged
jviotti merged 3 commits intomainfrom
mcp-resources
May 6, 2026
Merged

Support MCP resource listing#882
jviotti merged 3 commits intomainfrom
mcp-resources

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented May 6, 2026

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Index (community)

Details
Benchmark suite Current: 99b2dec Previous: d0e79df Ratio
Add one schema (0 existing) 227 ms 159 ms 1.43
Add one schema (100 existing) 22 ms 19 ms 1.16
Add one schema (1000 existing) 74 ms 65 ms 1.14
Add one schema (10000 existing) 631 ms 844 ms 0.75
Update one schema (1 existing) 15 ms 13 ms 1.15
Update one schema (101 existing) 21 ms 19 ms 1.11
Update one schema (1001 existing) 73 ms 66 ms 1.11
Update one schema (10001 existing) 628 ms 710 ms 0.88
Cached rebuild (1 existing) 4 ms 4 ms 1
Cached rebuild (101 existing) 6 ms 6 ms 1
Cached rebuild (1001 existing) 25 ms 24 ms 1.04
Cached rebuild (10001 existing) 238 ms 218 ms 1.09
Index 100 schemas 111 ms 83 ms 1.34
Index 1000 schemas 872 ms 777 ms 1.12
Index 10000 schemas 12643 ms 15657 ms 0.81

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Index (enterprise)

Details
Benchmark suite Current: 99b2dec Previous: d0e79df Ratio
Add one schema (0 existing) 187 ms 174 ms 1.07
Add one schema (100 existing) 18 ms 18 ms 1
Add one schema (1000 existing) 57 ms 57 ms 1
Add one schema (10000 existing) 485 ms 785 ms 0.62
Update one schema (1 existing) 14 ms 13 ms 1.08
Update one schema (101 existing) 18 ms 17 ms 1.06
Update one schema (1001 existing) 59 ms 56 ms 1.05
Update one schema (10001 existing) 491 ms 474 ms 1.04
Cached rebuild (1 existing) 4 ms 4 ms 1
Cached rebuild (101 existing) 5 ms 5 ms 1
Cached rebuild (1001 existing) 17 ms 17 ms 1
Cached rebuild (10001 existing) 158 ms 221 ms 0.71
Index 100 schemas 100 ms 91 ms 1.10
Index 1000 schemas 742 ms 802 ms 0.93
Index 10000 schemas 10776 ms 10431 ms 1.03

This comment was automatically generated by workflow using github-action-benchmark.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti marked this pull request as ready for review May 6, 2026 18:16
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 6, 2026

🤖 Augment PR Summary

Summary: This PR implements MCP resources/list for the Enterprise edition using the search index, adds cursor-based pagination and invalid-cursor handling, updates MCP schemas, and extends E2E coverage for pagination and error cases.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 13 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="enterprise/server/action_mcp_v1.cc">

<violation number="1" location="enterprise/server/action_mcp_v1.cc:184">
P2: Build resource URIs from `registry_url` (the base used by resources/read) instead of the CORS `allowed_origin`, otherwise listed URIs can’t be resolved when those values differ.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread enterprise/server/action_mcp_v1.cc
Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/jsonrpc/include/sourcemeta/one/jsonrpc.h
Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/self/v1/schemas/mcp/error.json
Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

#include <algorithm> // std::ranges::transform
#include <cassert> // assert
#include <cctype> // std::tolower
#include <charconv> // std::from_chars
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

result.assign_assume_new(
std::string{"nextCursor"},
sourcemeta::core::JSON{std::to_string(next_schema_offset)});
}
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enterprise/server/action_mcp_v1.cc — schema_offset + MCP_PAGE_SCHEMAS can overflow for extremely large (but valid) cursor values, potentially producing a wrapped nextCursor.
That could create surprising pagination behavior (e.g., empty page with a non-empty next cursor).

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

#include <algorithm> // std::ranges::transform
#include <cassert> // assert
#include <cctype> // std::tolower
#include <charconv> // std::from_chars
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Meta) Please ignore the previous "test" inline comment at this location; it was an accidental placeholder while validating review anchors.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit 6795ab1 into main May 6, 2026
5 checks passed
@jviotti jviotti deleted the mcp-resources branch May 6, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant