Skip to main content
Glama

list_teams

Retrieve a list of all teams accessible to the user on the HackMD platform, enabling efficient team management and collaboration.

Instructions

List all teams accessible to the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that fetches teams using client.getTeams() and returns formatted JSON or error message.
    async () => {
      try {
        const teams = await client.getTeams();
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(teams, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [{ type: "text", text: `Error: ${error.message}` }],
          isError: true,
        };
      }
    },
  • tools/teams.ts:7-33 (registration)
    Registers the 'list_teams' tool on the MCP server with name, description, empty input schema, metadata hints, and inline handler.
      "list_teams",
      "List all teams accessible to the user",
      {},
      {
        title: "Get a list of the teams to which the user has permission",
        readOnlyHint: true,
        openWorldHint: true,
      },
      async () => {
        try {
          const teams = await client.getTeams();
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(teams, null, 2),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `Error: ${error.message}` }],
            isError: true,
          };
        }
      },
    );
  • tools/index.ts:18-18 (registration)
    Calls registerTeamsApiTools within registerAllTools to register the teams tools including list_teams.
    registerTeamsApiTools(server, client);
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as pagination, rate limits, authentication requirements, or what 'accessible to the user' entails (e.g., permissions, visibility rules). This leaves significant gaps for agent decision-making.

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 that front-loads the core purpose without any wasted words. It's appropriately sized for a simple list tool with no parameters.

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. It doesn't explain what the output looks like (e.g., list format, fields included), behavioral constraints, or how 'accessible' is determined. For a tool with no structured metadata, more context is needed.

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 tool has 0 parameters, and schema description coverage is 100%, so there's no need for parameter details in the description. The description appropriately avoids redundant information, earning a baseline high score for this dimension.

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 ('List') and resource ('teams') with the scope 'accessible to the user', making the purpose immediately understandable. It doesn't explicitly distinguish from siblings like 'list_team_notes' or 'list_user_notes', but the resource focus is clear enough for basic differentiation.

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 'list_team_notes' or 'list_user_notes', nor does it mention prerequisites or context for usage. It simply states what it does without indicating when it's appropriate.

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