Skip to main content
Glama

create_team_note

Generate and manage collaborative notes within a team on HackMD by specifying title, content, permissions, and custom permalink.

Instructions

Create a new note in a team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payloadYesCreate note options
teamPathYesTeam path

Implementation Reference

  • The handler function that implements the core logic of the 'create_team_note' tool by calling the HackMD API client to create a team note.
    async ({ teamPath, payload }) => {
      try {
        const note = await client.createTeamNote(teamPath, payload);
        return {
          content: [
            {
              type: "text",
              text: `Team note created successfully:\n${JSON.stringify(note, null, 2)}`,
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [{ type: "text", text: `Error: ${error.message}` }],
          isError: true,
        };
      }
    },
  • Zod schema for note creation options (payload parameter in create_team_note tool).
    export const CreateNoteOptionsSchema = z.object({
      title: z.string().optional().describe("Note title"),
      content: z.string().optional().describe("Note content"),
      readPermission: z
        .enum([
          NotePermissionRole.OWNER,
          NotePermissionRole.SIGNED_IN,
          NotePermissionRole.GUEST,
        ])
        .optional()
        .describe("Read permission"),
      writePermission: z
        .enum([
          NotePermissionRole.OWNER,
          NotePermissionRole.SIGNED_IN,
          NotePermissionRole.GUEST,
        ])
        .optional()
        .describe("Write permission"),
      commentPermission: z
        .enum([
          CommentPermissionType.DISABLED,
          CommentPermissionType.FORBIDDEN,
          CommentPermissionType.OWNERS,
          CommentPermissionType.SIGNED_IN_USERS,
          CommentPermissionType.EVERYONE,
        ])
        .optional()
        .describe("Comment permission"),
      permalink: z.string().optional().describe("Custom permalink"),
    });
  • Registration of the 'create_team_note' MCP tool using server.tool(), defining name, description, input schema, hints, and handler.
    server.tool(
      "create_team_note",
      "Create a new note in a team",
      {
        teamPath: z.string().describe("Team path"),
        payload: CreateNoteOptionsSchema.describe("Create note options"),
      },
      {
        title: "Create a note in a Team workspace",
        readOnlyHint: false,
        destructiveHint: false,
        idempotentHint: false,
        openWorldHint: true,
      },
      async ({ teamPath, payload }) => {
        try {
          const note = await client.createTeamNote(teamPath, payload);
          return {
            content: [
              {
                type: "text",
                text: `Team note created successfully:\n${JSON.stringify(note, null, 2)}`,
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `Error: ${error.message}` }],
            isError: true,
          };
        }
      },
    );
  • tools/index.ts:20-20 (registration)
    Invocation of registerTeamNotesApiTools which includes registration of create_team_note.
    registerTeamNotesApiTools(server, client);
  • index.ts:132-132 (registration)
    Top-level call to registerAllTools, which chains to registration of create_team_note tool.
    registerAllTools(server, client);
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 states the tool creates a note, implying a write operation, but doesn't cover critical aspects like authentication requirements, rate limits, error conditions, or what happens on success (e.g., returns a note ID). For a mutation tool, this leaves significant gaps in understanding its behavior.

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 with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple creation tool and front-loaded with the core action, making it easy to parse quickly.

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 tool's complexity (a mutation with nested parameters) and lack of annotations and output schema, the description is incomplete. It doesn't explain return values, error handling, or behavioral nuances like permission implications, which are crucial for safe and effective use. This leaves the agent with insufficient context to invoke the tool correctly.

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 description coverage is 100%, with all parameters well-documented in the schema (e.g., 'teamPath' as 'Team path', 'payload' with nested properties like 'content' as 'Note content'). The description adds no additional parameter information beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage.

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 action ('Create a new note') and resource ('in a team'), which distinguishes it from sibling tools like 'create_note' that presumably create notes in a different context. However, it doesn't explicitly differentiate from 'update_team_note' or 'list_team_notes' beyond the verb, leaving some ambiguity about sibling relationships.

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 'create_note' or 'update_team_note'. It doesn't mention prerequisites, such as needing team access or permissions, or clarify scenarios where this tool is preferred over others in the sibling list.

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