Skip to main content
Glama

list_team_notes

List all notes of a specified HackMD team by providing its path. Retrieve team note summaries for quick overview and management.

Instructions

List notes of a team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
team_pathYesTeam path (e.g. 'my-team')

Implementation Reference

  • The `list_team_notes` tool handler: registered with Zod schema for `team_path`, calls `hackmdFetch` to GET /teams/:team_path/notes
    server.tool(
      "list_team_notes",
      "List notes of a team",
      {
        team_path: z.string().min(1).describe("Team path (e.g. 'my-team')"),
      },
      async ({ team_path }) => {
        try {
          return success(await hackmdFetch(`/teams/${team_path}/notes`));
        } catch (e) {
          return error((e as Error).message);
        }
      }
    );
  • Zod input schema for `list_team_notes`: requires `team_path` (string, min 1)
    server.tool(
      "list_team_notes",
      "List notes of a team",
      {
        team_path: z.string().min(1).describe("Team path (e.g. 'my-team')"),
      },
  • src/tools.ts:146-159 (registration)
    Tool registered via `server.tool('list_team_notes', ...)` inside `registerTools()`
    server.tool(
      "list_team_notes",
      "List notes of a team",
      {
        team_path: z.string().min(1).describe("Team path (e.g. 'my-team')"),
      },
      async ({ team_path }) => {
        try {
          return success(await hackmdFetch(`/teams/${team_path}/notes`));
        } catch (e) {
          return error((e as Error).message);
        }
      }
    );
  • `hackmdFetch` helper that performs authenticated HTTP requests to the HackMD API
    export async function hackmdFetch(
      path: string,
      options: { method?: string; body?: unknown } = {}
    ): Promise<unknown> {
      const { method = "GET", body } = options;
      const token = getToken();
    
      const res = await fetch(`${API_BASE}${path}`, {
        method,
        headers: {
          Authorization: `Bearer ${token}`,
          ...(body ? { "Content-Type": "application/json" } : {}),
        },
        ...(body ? { body: JSON.stringify(body) } : {}),
      });
    
      if (!res.ok) {
        const text = await res.text().catch(() => "");
        throw new Error(`HackMD API ${method} ${path} → ${res.status}: ${text}`);
      }
    
      if (res.status === 204) return { success: true };
      if (res.status === 202) return { success: true, status: "accepted" };
    
      return res.json();
    }
  • `success` and `error` response formatters used by the handler to return MCP-compatible results
    export function success(data: unknown) {
      return {
        content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
      };
    }
    
    export function error(message: string) {
      return {
        content: [{ type: "text" as const, text: JSON.stringify({ error: message }) }],
        isError: true as const,
      };
    }
Behavior2/5

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

No annotations provided, so the description must disclose behavioral traits. It only says 'List notes of a team' with no mention of read-only nature, permissions, or response details.

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

Conciseness4/5

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

The description is a single sentence with no unnecessary words. It is concise but could be expanded slightly for clarity without becoming verbose.

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 simplicity (1 param, no output schema), the description is too minimal. It does not explain what a 'note' is, what the return format is, or how it differs from 'list_notes'.

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

Parameters3/5

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

Schema coverage is 100%, so baseline is 3. The description adds no extra meaning beyond the schema, which already describes 'team_path' with an example.

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 verb 'List' and resource 'notes of a team', but lacks differentiation from the sibling tool 'list_notes' which likely lists all notes without team filtering.

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?

No guidance on when to use this tool vs alternatives like 'list_notes'. The description does not specify context or preconditions.

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

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/zyx1121/hackmd-mcp'

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