Skip to content

Conversation

@dishaprakash
Copy link
Contributor

@dishaprakash dishaprakash commented Dec 3, 2025

This PR establishes the foundational transport layer architecture required to support the Model Context Protocol (MCP) alongside the existing HTTP protocol.

This PR purely adds the structure for the transport layer.

Changes made:

  • Introduces the Transport interface and shared types in core/transport, effectively decoupling protocol mechanics from the high-level client logic.
  • Implements the toolboxtransport package, which encapsulates the native Toolbox HTTP request logic into a reusable transport implementation.
  • The protocol types from core package have been duplicated in core/transport/types.go along with the associated tests (This is being done to remove circular dependency)
  • A major part of this PR consists of extensive tests to keep the code coverage at ~95%

Subsequent PRs will contain:

  • MCP Transport
  • Integration into ToolboxClient & ToolboxTool
  • Cleanup of the protocol in core package to de-duplicate the shared types to provide backward compatibility.

@dishaprakash dishaprakash requested a review from a team as a code owner December 3, 2025 12:08
@dishaprakash dishaprakash marked this pull request as draft December 3, 2025 12:10
@dishaprakash dishaprakash marked this pull request as ready for review December 3, 2025 13:09
@twishabansal twishabansal added the priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. label Dec 4, 2025
}

payloadBytes, err := json.Marshal(payload)
invocationURL := fmt.Sprintf("%s/api/tool/%s/invoke", t.baseURL, toolName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use the joinpath function here?

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this needs a fix

}

payloadBytes, err := json.Marshal(payload)
invocationURL := fmt.Sprintf("%s/api/tool/%s/invoke", t.baseURL, toolName)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this needs a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants