share_request
Generate share tokens for HTTP requests to enable secure access and collaboration on captured web traffic within RequestRepo MCP.
Instructions
Create a share token for a request.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request_id | Yes |
Implementation Reference
- src/requestrepo_mcp/server.py:160-166 (handler)The actual business logic implementation of share_request in RequestrepoMCPService class. It calls the requestrepo client's share_request method and returns a dict containing request_id, share_token, and share_url.
def share_request(self, *, request_id: str) -> dict[str, Any]: share_token = self._client().share_request(request_id) return { "request_id": request_id, "share_token": share_token, "share_url": f"{self.config.protocol}://{self.config.host}/r/{share_token}", } - src/requestrepo_mcp/server.py:392-395 (registration)MCP tool registration using the @mcp.tool() decorator in the create_mcp_server function. This exposes the share_request functionality to MCP clients.
@mcp.tool() def share_request(request_id: str) -> dict[str, Any]: """Create a share token for a request.""" return resolved_service.share_request(request_id=request_id)