yera.tools.mcp.tool
MCP-backed Yera tool implementation.
Symbols
MCPTool
BaseToolA Yera tool backed by a remote MCP server.
Methods
MCPTool.__repr__
__repr__() → strReturn a concise representation of the imported MCP tool.
MCPTool.async_start
async_start(
*args,
**kwargs,
) → MCPTask[object]Start the MCP tool without waiting for server-created work.
Parameters
Positional values in imported schema-property order.
Named values matching the generated MCP input structure.
Returns
A stable task handle for immediate or asynchronous execution.
MCPTool.start
start(
*args,
**kwargs,
) → MCPTask[object]Start the MCP tool synchronously without waiting for server-created work.
Parameters
Positional values in imported schema-property order.
Named values matching the generated MCP input structure.
Returns
A stable task handle for immediate or asynchronous execution.
MCPTool.async_call
async_call(
*args,
**kwargs,
) → objectValidate arguments and invoke the MCP tool asynchronously.
Parameters
Positional values in imported schema-property order.
Named values matching the generated MCP input structure.
Returns
The converted Python result.
Raises
If the positional and keyword arguments cannot be bound.
If the arguments do not satisfy the imported schema.
If the remote server reports tool failure.
MCPTool.async_invoke
async_invoke(
instruction: str | None = None,
retry_on_mcp_error: bool = False,
**kwargs,
) → objectFill this tool's inputs and invoke it asynchronously.
Parameters
Optional instruction guiding input generation.
Whether to correct arguments and retry once after the MCP server rejects a call.
Additional values passed to LLM generation.
Returns
The converted result returned by the MCP tool.
MCPTool.invoke
invoke(
instruction: str | None = None,
retry_on_mcp_error: bool = False,
**kwargs,
) → objectFill this tool's inputs and invoke it synchronously.
Parameters
Optional instruction guiding input generation.
Whether to correct arguments and retry once after the MCP server rejects a call.
Additional values passed to LLM generation.
Returns
The converted result returned by the MCP tool.
MCPTool.__call__
__call__(
*args,
**kwargs,
) → objectValidate arguments and invoke the remote MCP tool.
Parameters
Positional values in imported schema-property order.
Named values matching the generated MCP input structure.
Returns
The converted Python result.
Raises
If the positional and keyword arguments cannot be bound.
If the arguments do not satisfy the imported schema.
If the remote server reports tool failure.