Skip to main content
Glama

list_project_users

Retrieve user IDs and usernames for a Kanboard project. Use returned user IDs to assign tasks or add comments.

Instructions

List the members of a Kanboard project (user_id + username pairs). Provide project_id or project_identifier, or configure .kanboard.yaml in your project root. Works for any user who can see the project — does not require admin permissions. Use the returned user_ids to assign tasks (create_task owner_id), add comments, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoNumeric project id. Falls back to .kanboard.yaml when omitted.
project_identifierNoShort project identifier. Falls back to .kanboard.yaml when omitted.

Implementation Reference

  • The main tool definition for 'list_project_users'. It defines the tool object with name, description, inputSchema, and the async handler that parses input, resolves project context, calls handler.getProjectUsers(), and returns the result.
    export const listProjectUsersTool = {
      name: "list_project_users",
      description:
        "List the members of a Kanboard project (user_id + username pairs). " +
        "Provide project_id or project_identifier, or configure .kanboard.yaml in your project root. " +
        "Works for any user who can see the project — does not require admin permissions. " +
        "Use the returned user_ids to assign tasks (create_task owner_id), add comments, etc.",
      inputSchema: ListProjectUsersInput,
      handler: async (raw: unknown, deps: ToolDeps): Promise<ListProjectUsersResult> => {
        const input = ListProjectUsersInput.parse(raw);
    
        const ctx = await resolveProjectContext(deps.handler, {
          ...(input.project_id !== undefined ? { explicitProjectId: input.project_id } : {}),
          ...(input.project_identifier !== undefined
            ? { explicitProjectIdentifier: input.project_identifier }
            : {}),
        });
    
        const users = await deps.handler.getProjectUsers(ctx.projectId);
        return {
          content: [{ type: "text", text: JSON.stringify(users, null, 2) }],
          structuredContent: { users },
        };
      },
    };
  • Input schema (Zod) for the tool: optional project_id (positive int) and project_identifier (string). Validates and types the incoming parameters.
    export const ListProjectUsersInput = z
      .object({
        project_id: z
          .number()
          .int()
          .positive()
          .optional()
          .describe("Numeric project id. Falls back to .kanboard.yaml when omitted."),
        project_identifier: z
          .string()
          .min(1)
          .optional()
          .describe("Short project identifier. Falls back to .kanboard.yaml when omitted."),
      })
      .strict();
  • registerTools() iterates over allTools array and calls server.registerTool() for each tool, including listProjectUsersTool. This is how the tool gets mounted on the MCP server.
    export function registerTools(server: McpServer, deps: ToolDeps): void {
      for (const tool of allTools) {
        // Cast: each tool handler returns a `{ content, structuredContent }` object
        // that satisfies `CallToolResult`. We use `unknown` in `ToolDef.handler` to
        // keep the per-tool return types encapsulated, so we cast here at the
        // registration boundary where the MCP SDK takes ownership.
        const cb = ((args: Record<string, unknown>) =>
          tool.handler(args, deps)) as unknown as ToolCallback;
    
        server.registerTool(
          tool.name,
          {
            description: tool.description,
            inputSchema: tool.inputSchema,
          },
          cb,
        );
      }
    }
  • KanboardHandler.getProjectUsers() — the underlying handler method that calls the Kanboard API via #apiClient.call('getProjectUsers'), normalizes the sparse dict response into ProjectMember[] sorted by user_id.
    public async getProjectUsers(projectId: number): Promise<ProjectMember[]> {
      const raw = await this.#apiClient.call("getProjectUsers", { project_id: projectId });
      this.#logger.debug({ method: "getProjectUsers", projectId }, "getProjectUsers OK");
    
      if (raw === false || raw === null || raw === undefined) {
        throw new KanboardApiError(
          "getProjectUsers",
          `getProjectUsers failed for project ${String(projectId)}`,
        );
      }
    
      if (typeof raw !== "object" || Array.isArray(raw)) {
        throw new KanboardApiError(
          "getProjectUsers",
          `getProjectUsers: expected dict, got ${Array.isArray(raw) ? "array" : typeof raw}`,
        );
      }
    
      const dict = raw as Record<string, unknown>;
      const members: ProjectMember[] = [];
      for (const [key, value] of Object.entries(dict)) {
        const userId = Number(key);
        if (!Number.isFinite(userId) || userId <= 0) {
          this.#logger.warn(
            { method: "getProjectUsers", projectId, key },
            "getProjectUsers: dropping malformed user_id key",
          );
          continue;
        }
        if (typeof value !== "string") {
          this.#logger.warn(
            { method: "getProjectUsers", projectId, key, valueType: typeof value },
            "getProjectUsers: dropping non-string username",
          );
          continue;
        }
        members.push({ user_id: userId, username: value });
      }
    
      members.sort((a, b) => a.user_id - b.user_id);
      return members;
    }
  • ProjectMember interface: the typed return shape with user_id (number) and username (string). Used by the tool's structuredContent response.
    export interface ProjectMember {
      user_id: number;
      username: string;
    }
Behavior3/5

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

Discloses that no admin permissions are required and that it works for any project viewer. Lacks details on whether the list is complete or paginated, and does not explicitly state read-only 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?

Three clear sentences with no redundancy. Front-loaded with the main action and result, followed by project specification and use cases.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Explains output format (user_id+username pairs) and how to use it. Lacks mention of any filtering or error cases, but adequate for a simple list tool with no output schema.

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?

Schema coverage is 100%, so baseline is 3. Description adds value by explaining the fallback to .kanboard.yaml and that both parameters are optional, which is not in the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it lists Kanboard project members as user_id+username pairs. Distinguishes from sibling tools like add_project_user and remove_project_user by focusing on listing. Also ties to use cases (assign tasks, comments).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context on when to use (need user IDs for assignment/comments) and how to specify the project. Does not explicitly mention when not to use or alternatives, but the purpose is well-defined.

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

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/ErnestoCorona/kanboard-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server