Skip to main content
Glama

get_history

Retrieve user's reading history from HackMD to track accessed notes and improve content management.

Instructions

Get user's reading history

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the "get_history" tool. It fetches the user's reading history from the HackMD API client, stringifies it as JSON, and returns it as text content. Handles errors by returning an error message.
    async () => {
      try {
        const history = await client.getHistory();
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(history, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [{ type: "text", text: `Error: ${error.message}` }],
          isError: true,
        };
      }
    },
  • tools/history.ts:6-33 (registration)
    Registers the "get_history" MCP tool using server.tool(), specifying the name, description, empty input schema, output hints (title, readOnlyHint, openWorldHint), and the handler function.
    server.tool(
      "get_history",
      "Get user's reading history",
      {},
      {
        title: "Get a history of read notes",
        readOnlyHint: true,
        openWorldHint: true,
      },
      async () => {
        try {
          const history = await client.getHistory();
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(history, null, 2),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `Error: ${error.message}` }],
            isError: true,
          };
        }
      },
    );
  • tools/index.ts:19-19 (registration)
    Invokes registerHistoryApiTools within registerAllTools to perform the tool registration for get_history (and other tools).
    registerHistoryApiTools(server, client);
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Get user's reading history' implies a read-only operation, but it doesn't specify authentication requirements, rate limits, whether it returns structured data or raw text, error conditions, or if it's cached. For a tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.

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: 'Get user's reading history'. It's front-loaded with the core action and resource, with no wasted words or redundant phrasing. Every word earns its place by conveying the essential purpose without unnecessary elaboration.

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?

Given the lack of annotations and output schema, the description is incomplete for effective tool use. It doesn't explain what 'reading history' entails (e.g., articles, books, timestamps), the return format, or how it relates to sibling tools like note management functions. For a data retrieval tool with no structured output definition, more context is needed to understand what the agent will receive.

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 input schema has 0 parameters with 100% coverage, meaning no parameters need documentation. The description doesn't mention any parameters, which is appropriate since none exist. It doesn't add semantic details beyond the schema, but with zero parameters, the baseline is 4 as the description doesn't need to compensate for any gaps.

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

Purpose3/5

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

The description 'Get user's reading history' states the action (get) and resource (reading history), but it's vague about scope and format. It doesn't specify whether this returns recent items, all-time history, paginated results, or what fields are included. Compared to sibling tools like 'get_note' or 'get_user_info', it lacks differentiation in what makes this specific reading history retrieval unique.

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. With sibling tools like 'list_user_notes' or 'get_user_info', there's no indication whether this tool is for personal history only, team-related history, or how it differs from other data retrieval tools. No prerequisites, exclusions, or contextual recommendations are mentioned.

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