Skip to main content
Glama
prismism-dev

Prismism MCP Server

by prismism-dev

prismism_health

Check if the Prismism MCP server is operational and API keys are properly configured to enable file uploads and link generation from AI agents.

Instructions

Verify that the Prismism MCP server is running and the API key is configured correctly. Call this first to confirm your setup works before doing anything else.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'prismism_health' tool.
    server.registerTool(
      'prismism_health',
      {
        title: 'Prismism Health Check',
        description:
          'Verify that the Prismism MCP server is running and the API key is configured correctly. Call this first to confirm your setup works before doing anything else.',
      },
      async () => {
        const baseUrl = getBaseUrl();
        const hasKey = hasApiKey();
    
        if (!hasKey) {
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  ok: true,
                  data: {
                    baseUrl,
                    authenticated: false,
                    version: VERSION,
                  },
                  _hints: [
                    'No API key configured. Set PRISMISM_API_KEY in your MCP config to authenticate.',
                    'Register at https://prismism.dev or use the prismism_register tool to create an account.',
                  ],
                }),
              },
            ],
          };
        }
    
        // Verify the key works by hitting the account endpoint
        const result = await get('/v1/account');
    
        if (!result.ok) {
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  ok: false,
                  data: {
                    baseUrl,
                    authenticated: false,
                    version: VERSION,
                  },
                  error: result.error,
                  _hints: result._hints || [
                    'API key is set but authentication failed. Check that your key is correct.',
                  ],
                }),
              },
            ],
            isError: true,
          };
        }
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                ok: true,
                data: {
                  baseUrl,
                  authenticated: true,
                  version: VERSION,
                  account: result.data,
                },
              }),
            },
          ],
        };
      }
    );
  • The handler function that executes the prismism_health tool logic, including API key verification and account connectivity check.
    async () => {
      const baseUrl = getBaseUrl();
      const hasKey = hasApiKey();
    
      if (!hasKey) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                ok: true,
                data: {
                  baseUrl,
                  authenticated: false,
                  version: VERSION,
                },
                _hints: [
                  'No API key configured. Set PRISMISM_API_KEY in your MCP config to authenticate.',
                  'Register at https://prismism.dev or use the prismism_register tool to create an account.',
                ],
              }),
            },
          ],
        };
      }
    
      // Verify the key works by hitting the account endpoint
      const result = await get('/v1/account');
    
      if (!result.ok) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                ok: false,
                data: {
                  baseUrl,
                  authenticated: false,
                  version: VERSION,
                },
                error: result.error,
                _hints: result._hints || [
                  'API key is set but authentication failed. Check that your key is correct.',
                ],
              }),
            },
          ],
          isError: true,
        };
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              ok: true,
              data: {
                baseUrl,
                authenticated: true,
                version: VERSION,
                account: result.data,
              },
            }),
          },
        ],
      };
    }

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/prismism-dev/mcp-server'

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