Skip to main content
Glama
InsForge

Insforge MCP Server

get-backend-metadata

Retrieve structured metadata from the Insforge backend platform to access Auth, Database, Storage, and Functions configuration details for development workflows.

Instructions

Index all backend metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyNoAPI key for authentication (optional if provided via --api_key)

Implementation Reference

  • The core handler function for the 'get-backend-metadata' tool. It fetches metadata from the backend API endpoint `/api/metadata?mcp=true` using the resolved API key, processes the response, adds optional background context, and returns a formatted text content block or error response.
    withUsageTracking('get-backend-metadata', async ({ apiKey }) => {
      try {
        const actualApiKey = getApiKey(apiKey);
        const response = await fetch(`${API_BASE_URL}/api/metadata?mcp=true`, {
          method: 'GET',
          headers: {
            'x-api-key': actualApiKey,
          },
        });
    
        const metadata = await handleApiResponse(response);
    
        return await addBackgroundContext({
          content: [
            {
              type: 'text',
              text: `Backend metadata:\n\n${JSON.stringify(metadata, null, 2)}`,
            },
          ],
        });
      } catch (error) {
        const errMsg = error instanceof Error ? error.message : 'Unknown error occurred';
        return {
          content: [
            {
              type: 'text',
              text: `Error retrieving backend metadata: ${errMsg}`,
            },
          ],
          isError: true,
        };
      }
    })
  • The MCP server.tool registration for 'get-backend-metadata', including tool name, description, input schema, and wrapped handler reference.
    server.tool(
      'get-backend-metadata',
      'Index all backend metadata',
      {
        apiKey: z
          .string()
          .optional()
          .describe('API key for authentication (optional if provided via --api_key)'),
      },
      withUsageTracking('get-backend-metadata', async ({ apiKey }) => {
        try {
          const actualApiKey = getApiKey(apiKey);
          const response = await fetch(`${API_BASE_URL}/api/metadata?mcp=true`, {
            method: 'GET',
            headers: {
              'x-api-key': actualApiKey,
            },
          });
    
          const metadata = await handleApiResponse(response);
    
          return await addBackgroundContext({
            content: [
              {
                type: 'text',
                text: `Backend metadata:\n\n${JSON.stringify(metadata, null, 2)}`,
              },
            ],
          });
        } catch (error) {
          const errMsg = error instanceof Error ? error.message : 'Unknown error occurred';
          return {
            content: [
              {
                type: 'text',
                text: `Error retrieving backend metadata: ${errMsg}`,
              },
            ],
            isError: true,
          };
        }
      })
    );
  • Zod input schema for the tool, defining an optional 'apiKey' parameter.
    {
      apiKey: z
        .string()
        .optional()
        .describe('API key for authentication (optional if provided via --api_key)'),
    },
  • Helper function used by the handler to resolve the API key from global config, ignoring tool-specific param for consistency.
    // The optional parameter is kept for backward compatibility but ignored
    const getApiKey = (_toolApiKey?: string): string => {
      if (!GLOBAL_API_KEY) {
        throw new Error('API key is required. Pass --api_key when starting the MCP server.');
      }
      return GLOBAL_API_KEY;
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Index all backend metadata' implies a read operation, but it doesn't disclose behavioral traits such as whether it's safe (non-destructive), requires authentication (though the schema hints at an optional API key), rate limits, or what 'index' entails (e.g., returns a list, summary, or detailed data). The description adds minimal context beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, 'Index all backend metadata', which is front-loaded and efficient. It avoids unnecessary words, but could be slightly more informative without losing conciseness. Every word earns its place, though it's borderline minimal.

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 no annotations, no output schema, and a vague description, the tool's complexity (indexing metadata) isn't adequately explained. The description lacks details on what 'backend metadata' includes, the format of the output, or any constraints, making it incomplete for effective agent use despite the simple parameter 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?

The input schema has 1 parameter with 100% description coverage, documenting an optional API key for authentication. The description doesn't add any parameter details, which is acceptable since the schema fully covers it. With 0 parameters requiring extra semantics, a baseline of 4 is appropriate as no compensation is needed.

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

Purpose3/5

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

The description 'Index all backend metadata' states a verb ('Index') and resource ('backend metadata'), giving a basic purpose. However, it's vague about what 'index' means (e.g., retrieve, list, or catalog) and doesn't distinguish it from siblings like 'list-buckets' or 'get-table-schema', which might overlap in metadata retrieval. It avoids tautology but lacks specificity.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'list-buckets' and 'get-table-schema' that might handle specific metadata types, the description doesn't indicate if this tool is comprehensive or for general use, leaving the agent without context for selection.

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/InsForge/insforge-mcp'

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