Skip to main content
Glama

list_team_notes

Retrieve all notes within a specified team to manage and organize collaborative content efficiently using the HackMD API.

Instructions

List all notes in a team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamPathYesTeam path

Implementation Reference

  • The asynchronous handler function for the 'list_team_notes' tool. It calls client.getTeamNotes(teamPath) via the HackMD API and returns the notes as formatted JSON or an error response.
    async ({ teamPath }) => {
      try {
        const notes = await client.getTeamNotes(teamPath);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(notes, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [{ type: "text", text: `Error: ${error.message}` }],
          isError: true,
        };
      }
    },
  • Registers the 'list_team_notes' tool on the MCP server, including name, description, input schema { teamPath: z.string() }, metadata hints, and inline handler function.
      "list_team_notes",
      "List all notes in a team",
      {
        teamPath: z.string().describe("Team path"),
      },
      {
        title: "Get a list of notes in a Team's workspace",
        readOnlyHint: true,
        openWorldHint: true,
      },
      async ({ teamPath }) => {
        try {
          const notes = await client.getTeamNotes(teamPath);
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(notes, null, 2),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `Error: ${error.message}` }],
            isError: true,
          };
        }
      },
    );
  • tools/index.ts:20-20 (registration)
    Calls registerTeamNotesApiTools(server, client), which registers the 'list_team_notes' tool among other team notes tools.
    registerTeamNotesApiTools(server, client);
  • index.ts:132-132 (registration)
    Calls registerAllTools(server, client) from tools/index.ts, which ultimately registers the 'list_team_notes' tool.
    registerAllTools(server, client);
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