issue_get_attachments
Retrieve attachments associated with a specific Yandex Tracker issue by providing its unique issue ID in the format '-'.
Instructions
Get attachments of a Yandex Tracker issue by its id
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | Issue ID in the format '<project>-<id>', like 'SOMEPROJECT-1' |
Implementation Reference
- mcp_tracker/mcp/tools.py:323-333 (handler)The MCP tool handler function for 'issue_get_attachments'. Validates the issue_id against allowed queues and delegates the request to the underlying issues protocol.@mcp.tool(description="Get attachments of a Yandex Tracker issue by its id") async def issue_get_attachments( ctx: Context[Any, AppContext], issue_id: IssueID, ) -> list[IssueAttachment]: check_issue_id(settings, issue_id) return await ctx.request_context.lifespan_context.issues.issue_get_attachments( issue_id, auth=get_yandex_auth(ctx), )
- mcp_tracker/mcp/params.py:23-26 (schema)Pydantic schema definition for the 'issue_id' input parameter of the tool.IssueID = Annotated[ str, Field(description="Issue ID in the format '<project>-<id>', like 'SOMEPROJECT-1'"), ]
- mcp_tracker/mcp/server.py:166-166 (registration)Registration of all MCP tools, including 'issue_get_attachments', by calling register_tools on the FastMCP server instance.register_tools(settings, mcp)
- mcp_tracker/mcp/tools.py:40-44 (helper)Helper function used by the handler to validate if the issue's queue is allowed per settings.def check_issue_id(settings: Settings, issue_id: str) -> None: queue, _ = issue_id.split("-") if settings.tracker_limit_queues and queue not in settings.tracker_limit_queues: raise IssueNotFound(issue_id)
- Underlying implementation in TrackerClient that makes the HTTP GET request to the Yandex Tracker API endpoint for issue attachments.async def issue_get_attachments( self, issue_id: str, *, auth: YandexAuth | None = None ) -> list[IssueAttachment]: async with self._session.get( f"v3/issues/{issue_id}/attachments", headers=await self._build_headers(auth) ) as response: if response.status == 404: raise IssueNotFound(issue_id) response.raise_for_status() return IssueAttachmentList.model_validate_json(await response.read()).root