user_get_current
Retrieve details about the currently authenticated user in Yandex Tracker, enabling access to user-specific information and role validation within the platform.
Instructions
Get information about the current authenticated user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp_tracker/mcp/tools.py:422-428 (handler)MCP tool handler for 'user_get_current'. Registers the tool and implements the logic by proxying to the underlying users service to fetch the current authenticated user.async def user_get_current( ctx: Context[Any, AppContext], ) -> User: user = await ctx.request_context.lifespan_context.users.user_get_current( auth=get_yandex_auth(ctx), ) return user
- Core implementation of user_get_current in the Yandex Tracker client, making an HTTP GET request to the '/v3/myself' endpoint to retrieve the current user data.async def user_get_current(self, *, auth: YandexAuth | None = None) -> User: async with self._session.get( "v3/myself", headers=await self._build_headers(auth) ) as response: response.raise_for_status() return User.model_validate_json(await response.read())