hackmd-mcp
Version:
[](https://smithery.ai/server/@yuna0x0/hackmd-mcp)
23 lines (22 loc) • 682 B
JavaScript
export function registerUserApiTools(server, client) {
// Tool: Get user information
server.tool("get_user_info", "Get information about the authenticated user", {}, async () => {
try {
const userInfo = await client.getMe();
return {
content: [
{
type: "text",
text: JSON.stringify(userInfo, null, 2),
},
],
};
}
catch (error) {
return {
content: [{ type: "text", text: `Error: ${error.message}` }],
isError: true,
};
}
});
}