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
| Name | Required | Description | Default |
|---|---|---|---|
| teamPath | Yes | Team path |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"teamPath": {
"description": "Team path",
"type": "string"
}
},
"required": [
"teamPath"
],
"type": "object"
}
Implementation Reference
- tools/teamNotes.ts:22-39 (handler)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, }; } },
- tools/teamNotes.ts:12-40 (registration)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);