get_global_fields
Retrieve all global fields available in Yandex Tracker for managing and customizing issue attributes, ensuring consistent data across workflows.
Instructions
Get all global fields available in Yandex Tracker that can be used in issues
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp_tracker/mcp/tools.py:158-167 (handler)MCP tool handler for 'get_global_fields'. Decorated with @mcp.tool and delegates the call to the fields protocol implementation in the app context.@mcp.tool( description="Get all global fields available in Yandex Tracker that can be used in issues" ) async def get_global_fields( ctx: Context[Any, AppContext], ) -> list[GlobalField]: fields = await ctx.request_context.lifespan_context.fields.get_global_fields( auth=get_yandex_auth(ctx), ) return fields
- mcp_tracker/mcp/server.py:164-166 (registration)Calls register_tools which defines and registers all MCP tools including 'get_global_fields' on the FastMCP server instance.mcp = create_mcp_server() register_resources(settings, mcp) register_tools(settings, mcp)
- Pydantic model defining the output schema (GlobalField) returned by the get_global_fields tool.class GlobalField(BaseTrackerEntity): """Global field available in Yandex Tracker""" id: str name: str | None = None key: str | None = None version: int | None = None schema_: FieldSchema | None = Field( default=None, alias="schema", serialization_alias="schema" ) readonly: bool | None = None options: bool | None = None suggest: bool | None = None type: str | None = None order: int | None = None suggestProvider: SuggestProvider | None = None optionsProvider: OptionsProvider | None = None queryProvider: QueryProvider | None = None category: CategoryRef | None = None
- Core implementation of get_global_fields in TrackerClient: performs HTTP GET to Yandex Tracker API /v3/fields endpoint with authentication.async def get_global_fields( self, *, auth: YandexAuth | None = None ) -> list[GlobalField]: async with self._session.get( "v3/fields", headers=await self._build_headers(auth) ) as response: response.raise_for_status() return GlobalFieldList.model_validate_json(await response.read()).root
- Protocol (interface) defining the get_global_fields method signature used by the MCP handler and implementations.class GlobalDataProtocol(Protocol): async def get_global_fields( self, *, auth: YandexAuth | None = None ) -> list[GlobalField]: ... async def get_statuses(self, *, auth: YandexAuth | None = None) -> list[Status]: ... async def get_issue_types( self, *, auth: YandexAuth | None = None ) -> list[IssueType]: ... async def get_priorities( self, *, auth: YandexAuth | None = None ) -> list[Priority]: ...