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

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

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);

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