Skip to content

Restore MCPMethodInfo argument compatibility with lazy caching - #27

Draft
Daigrin with Copilot wants to merge 2 commits into
mainfrom
copilot/research-mcpmethodinfo-changes
Draft

Daigrin with Copilot wants to merge 2 commits into
mainfrom
copilot/research-mcpmethodinfo-changes

Conversation

Copilot AI commented Oct 3, 2026

Copy link
Copy Markdown

Summary

Restore MCPMethodInfo argument compatibility fields and cache decoded arguments on demand. Preserve independent extraction of owner and repo when one value has an invalid type.

Why

Consumers need the established Owner, Repo, and Arguments fields without forcing every request to materialize its full argument payload.

What changed

  • Add Owner, Repo, and lazily populated Arguments fields.
  • Cache decoded arguments and errors; serialize concurrent DecodeArguments() calls.
  • Document that decoded arguments are shared, read-only, and argument fields must not change after decoding.
  • Cover invalid field types, duplicate keys, cache behavior, and concurrent calls.

MCP impact

  • No tool or API changes
    MCP tool schemas and wire behavior are unchanged; this restores Go-side MCPMethodInfo compatibility.
  • Tool schema or behavior changed
  • New tool added

Prompts tested (tool changes only)

  • Not applicable; no MCP tools changed.

Security / limits

  • Auth / permissions considered
    Scope challenge behavior and invalid-argument fallback remain unchanged.
  • Data exposure, filtering, or token/size limits considered
    Decoded arguments are shared and documented as read-only; request size limits are unchanged.
  • No security or limits impact

Tool renaming

  • I am renaming tools as part of this PR (e.g. as part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint — unable to complete because golangci-lint could not be downloaded.
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

Copilot AI and others added 2 commits October 3, 2026 04:12
Co-authored-by: Daigrin <198701947+Daigrin@users.noreply.github.com>
Co-authored-by: Daigrin <198701947+Daigrin@users.noreply.github.com>

@Daigrin Daigrin left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Approve

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.

2 participants