session_info
Retrieve active client session details, including optional authentication token, for managing HTTP requests and DNS configurations in RequestRepo.
Instructions
Return session info for the active requestrepo client.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/requestrepo_mcp/server.py:47-56 (handler)The session_info handler method in RequestrepoMCPService class that implements the actual business logic. Returns session info including subdomain, domain, endpoint, and optionally the token based on the include_token parameter.
def session_info(self, *, include_token: bool = False) -> dict[str, Any]: client = self._client() payload: dict[str, Any] = { "subdomain": client.subdomain, "domain": client.domain, "endpoint": f"{client.subdomain}.{client.domain}", } if include_token: payload["token"] = client.token return payload - src/requestrepo_mcp/server.py:339-342 (registration)Registration of the session_info tool using the @mcp.tool() decorator. This defines the MCP tool interface that accepts an optional include_token parameter and delegates to the service's session_info method.
@mcp.tool() def session_info(include_token: bool = False) -> dict[str, Any]: """Return session info for the active requestrepo client.""" return resolved_service.session_info(include_token=include_token)