Skip to main content
Glama
prismism-dev

Prismism MCP Server

by prismism-dev

prismism_get

Retrieve details and analytics for a specific artifact by ID to track usage and manage shared files.

Instructions

Get details and analytics for a specific artifact by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesArtifact ID

Implementation Reference

  • The handler implementation for the prismism_get tool, which validates the API key and makes a call to the Prismism API.
    async ({ id }) => {
      if (!hasApiKey()) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                ok: false,
                error: { code: 'NO_API_KEY', message: 'API key required' },
                _hints: ['Set PRISMISM_API_KEY in your MCP config.'],
              }),
            },
          ],
          isError: true,
        };
      }
    
      const result = await get(`/v1/artifacts/${id}`);
    
      if (!result.ok) {
        return {
          content: [{ type: 'text', text: JSON.stringify(result) }],
          isError: true,
        };
      }
    
      return {
        content: [{ type: 'text', text: JSON.stringify({ ok: true, data: result.data }) }],
      };
    }
  • src/tools/get.ts:6-45 (registration)
    Tool registration for 'prismism_get' using the McpServer instance.
    server.registerTool(
      'prismism_get',
      {
        title: 'Get Prismism Artifact',
        description: 'Get details and analytics for a specific artifact by ID.',
        inputSchema: {
          id: z.string().describe('Artifact ID'),
        },
      },
      async ({ id }) => {
        if (!hasApiKey()) {
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  ok: false,
                  error: { code: 'NO_API_KEY', message: 'API key required' },
                  _hints: ['Set PRISMISM_API_KEY in your MCP config.'],
                }),
              },
            ],
            isError: true,
          };
        }
    
        const result = await get(`/v1/artifacts/${id}`);
    
        if (!result.ok) {
          return {
            content: [{ type: 'text', text: JSON.stringify(result) }],
            isError: true,
          };
        }
    
        return {
          content: [{ type: 'text', text: JSON.stringify({ ok: true, data: 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