Describe the tool
The server registers a tool with a name, description, and input shape.
server.registerTool(
"get_current_time",
{
description: "Return the current time in UTC",
inputSchema: z.object({}),
},
async () => {
// The work goes here.
},
);
The empty object means the tool needs no input. Its description tells the host and model what the tool is for.