Skip to main content
Glama

get_metadata

Retrieve cached MantisBT project, user, version, and category data. Automatically syncs if cache is expired or missing, ensuring access to current metadata for issue management.

Instructions

Return cached MantisBT metadata (projects, users, versions, categories).

If the cache does not exist or has expired (default TTL: 24 hours), it will automatically sync first. Use sync_metadata to force a refresh.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the get_metadata tool. It attempts to load metadata from the cache or fetches and caches it if invalid or missing.
      async () => {
        try {
          const data: CachedMetadata = await cache.loadIfValid() ?? await fetchAndCacheMetadata(client, cache);
    
          return {
            content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: 'text', text: errorText(msg) }], isError: true };
        }
      }
    );
  • The registration of the get_metadata tool within the MCP server.
      server.registerTool(
        'get_metadata',
        {
          title: 'Get Cached Metadata',
          description: `Return cached MantisBT metadata (projects, users, versions, categories).
    
    If the cache does not exist or has expired (default TTL: 24 hours), it will automatically sync first.
    Use sync_metadata to force a refresh.`,
          inputSchema: z.object({}),
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: 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