Skip to main content
Glama

list_projects

Retrieve all MantisBT projects available to your API user for bug tracking and management tasks.

Instructions

List all MantisBT projects accessible to the current API user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for 'list_projects' that calls the MantisClient to fetch projects and returns the result as text.
    async () => {
      try {
        const result = await client.get<{ projects: MantisProject[] }>('projects');
        return {
          content: [{ type: 'text', text: JSON.stringify(result.projects ?? result, null, 2) }],
        };
      } catch (error) {
        const msg = error instanceof Error ? error.message : String(error);
        return { content: [{ type: 'text', text: errorText(msg) }], isError: true };
      }
    }
  • Registration of the 'list_projects' tool in the MCP server.
    server.registerTool(
      'list_projects',
      {
        title: 'List Projects',
        description: 'List all MantisBT projects accessible to the current API user.',
        inputSchema: z.object({}),
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
        },
      },
      async () => {
        try {
          const result = await client.get<{ projects: MantisProject[] }>('projects');
          return {
            content: [{ type: 'text', text: JSON.stringify(result.projects ?? result, null, 2) }],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: 'text', text: errorText(msg) }], isError: true };
        }
      }
    );

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/dpesch/mantisbt-mcp-server'

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