get_time
Retrieve the current time via JSON-RPC on the Simple HTTP MCP Server. Designed for remote execution, it provides accurate time data for integration into client applications.
Instructions
Get the current time.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tests/app/tools.py:37-39 (handler)The handler function for the 'get_time' tool, which returns the current time in HH:MM:SS format using UTC.async def get_time() -> GetTimeOutput: """Get the current time.""" return GetTimeOutput(time=datetime.now(UTC).strftime("%H:%M:%S"))
- tests/app/tools.py:33-34 (schema)Pydantic output schema for the 'get_time' tool, defining the 'time' field.class GetTimeOutput(BaseModel): time: str = Field(description="The current time")
- tests/app/tools.py:102-106 (registration)Registration of the 'get_time' tool in the TOOLS tuple, specifying function, no inputs, and output schema.Tool( func=get_time, inputs=type(None), output=GetTimeOutput, ),