Skip to main content
Glama

get_user_info

Retrieve detailed information about the authenticated user to enable personalized interactions within the HackMD platform.

Instructions

Get information about the authenticated user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_user_info' tool. It fetches the authenticated user's information using the HackMD API client, formats it as pretty-printed JSON text, and returns it in MCP content format. Includes error handling to return an error message if the API call fails.
    async () => {
      try {
        const userInfo = await client.getMe();
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(userInfo, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [{ type: "text", text: `Error: ${error.message}` }],
          isError: true,
        };
      }
    },
  • tools/profile.ts:7-33 (registration)
    Registers the 'get_user_info' tool on the MCP server using server.tool(). Specifies the tool name, description, empty input schema ({}), metadata hints, and attaches the inline handler function.
      "get_user_info",
      "Get information about the authenticated user",
      {},
      {
        title: "Get user information",
        readOnlyHint: true,
        openWorldHint: true,
      },
      async () => {
        try {
          const userInfo = await client.getMe();
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(userInfo, null, 2),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `Error: ${error.message}` }],
            isError: true,
          };
        }
      },
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'authenticated user' which implies some authentication requirement, but doesn't specify what information is returned, potential rate limits, error conditions, or other behavioral traits. This leaves significant gaps for an agent to understand how to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a simple tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what type of user information is returned, the format of the response, or any behavioral constraints. Given the lack of structured data elsewhere, the description should provide more context about what the agent can expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't waste space discussing non-existent parameters, earning a baseline score of 4 for not adding unnecessary information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('information about the authenticated user'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'get_history' or 'get_note', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'list_user_notes' or 'get_history', nor does it mention any prerequisites or exclusions. It simply states what the tool does without contextual usage advice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuna0x0/hackmd-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server