yera.tools.mcp.metadata

Public metadata exposed by MCP-backed Yera tools.

Symbols

class MCPServerMetadata — Describe the configured server that supplied an MCP tool.
class MCPToolAnnotations — Retain the behavioural hints advertised by an MCP server.
class MCPToolIcon — Describe an icon advertised for an MCP tool.
class MCPToolMetadata — Describe an imported MCP tool without refreshing the remote server.

MCPServerMetadata

Describe the configured server that supplied an MCP tool.

Attributes

name
type: str

Yera's configured name for the server.

url
type: str

Streamable HTTP endpoint used to reach the server.

MCPToolAnnotations

Retain the behavioural hints advertised by an MCP server.

These values are untrusted hints and must not be treated as an authorization or security boundary.

Attributes

title
type: str | None

Alternate human-readable title.

read_only_hint
type: bool | None

Whether the server claims the tool is read-only.

destructive_hint
type: bool | None

Whether the server claims writes may be destructive.

idempotent_hint
type: bool | None

Whether repeated calls should have no additional effect.

open_world_hint
type: bool | None

Whether the tool may interact with external entities.

Methods

from_dict — Build annotations from serialized MCP protocol metadata.

MCPToolAnnotations.from_dict

from_dict(
    values: Mapping[str, object] | None,
) → MCPToolAnnotations

Build annotations from serialized MCP protocol metadata.

Parameters

values
type: Mapping[str, object] | None

Serialized annotations, or None when absent.

Returns

type: MCPToolAnnotations

Parsed server-supplied annotation hints.

MCPToolIcon

Describe an icon advertised for an MCP tool.

Attributes

src
type: str

Icon URL or data URI supplied by the server.

mime_type
type: str | None

Optional advertised media type.

sizes
type: tuple[str, ...]

Optional supported icon sizes.

theme
type: Literal['light', 'dark'] | None

Optional light or dark theme restriction.

Methods

from_dict — Build an icon description from serialized MCP metadata.

MCPToolIcon.from_dict

from_dict(
    values: Mapping[str, object],
) → MCPToolIcon

Build an icon description from serialized MCP metadata.

Parameters

values
type: Mapping[str, object]

Serialized icon metadata.

Returns

type: MCPToolIcon

Parsed icon metadata without fetching its source.

MCPToolMetadata

Describe an imported MCP tool without refreshing the remote server.

Attributes

path
type: str

Fully qualified Python path beneath yr.mcp_tools.

python_name
type: str

Python-safe leaf name.

remote_name
type: str

Exact tool name advertised by the MCP server.

server
type: MCPServerMetadata

Configured server identity.

title
type: str | None

Preferred human-readable title.

description
type: str | None

Human-readable tool description.

input_schema
type: Mapping[str, object]

Advertised JSON Schema for tool arguments.

output_schema
type: Mapping[str, object] | None

Optional advertised JSON Schema for structured output.

annotations
type: MCPToolAnnotations

Untrusted behavioural hints supplied by the server.

icons
type: tuple[MCPToolIcon, ...]

Icon descriptions retained without fetching their contents.

task_support
type: Literal['forbidden', 'optional', 'required'] | None

Advertised legacy task-execution support.

extensions
type: Mapping[str, object]

Arbitrary namespaced MCP metadata.

Methods

from_record — Build public metadata from a locally cached catalogue record.

MCPToolMetadata.from_record

from_record(
    server_name: str,
    server_url: str,
    record: MCPToolRecord,
) → MCPToolMetadata

Build public metadata from a locally cached catalogue record.

Parameters

server_name
type: str

Yera's configured name for the server.

server_url
type: str

Configured Streamable HTTP endpoint.

record
type: MCPToolRecord

Cached tool discovery metadata.

Returns

type: MCPToolMetadata

Public metadata for local inspection.