Skip to main content
Glama
prismism-dev

Prismism MCP Server

by prismism-dev

Update Prismism Artifact

prismism_update

Modify artifact settings including title, download permissions, and password protection for existing files in the Prismism MCP Server.

Instructions

Update settings for an existing artifact — title, download permissions, or password protection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesArtifact ID
titleNoNew display title
allowDownloadNoAllow viewers to download the file
passwordNoSet a password to protect the artifact (empty string to remove)

Implementation Reference

  • The 'prismism_update' tool is registered within the 'registerUpdateTool' function.
    export function registerUpdateTool(server: McpServer) {
      server.registerTool(
        'prismism_update',
        {
          title: 'Update Prismism Artifact',
          description: 'Update settings for an existing artifact — title, download permissions, or password protection.',
          inputSchema: {
            id: z.string().describe('Artifact ID'),
            title: z.string().optional().describe('New display title'),
            allowDownload: z.boolean().optional().describe('Allow viewers to download the file'),
            password: z.string().optional().describe('Set a password to protect the artifact (empty string to remove)'),
          },
        },
        async ({ id, title, allowDownload, password }) => {
          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 updates: Record<string, unknown> = {};
          if (title !== undefined) updates.title = title;
          if (allowDownload !== undefined) updates.allowDownload = allowDownload;
          if (password !== undefined) updates.password = password;
    
          if (Object.keys(updates).length === 0) {
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify({
                    ok: false,
                    error: { code: 'NO_UPDATES', message: 'No fields to update' },
                    _hints: ['Provide at least one field to update: title, allowDownload, or password.'],
                  }),
                },
              ],
              isError: true,
            };
          }
    
          const result = await patch(`/v1/artifacts/${id}`, updates);
    
          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 }) }],
          };
        }
      );
    }
  • The handler function for 'prismism_update' implements input validation, API key check, and calls the patch helper to update the artifact.
    async ({ id, title, allowDownload, password }) => {
      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 updates: Record<string, unknown> = {};
      if (title !== undefined) updates.title = title;
      if (allowDownload !== undefined) updates.allowDownload = allowDownload;
      if (password !== undefined) updates.password = password;
    
      if (Object.keys(updates).length === 0) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                ok: false,
                error: { code: 'NO_UPDATES', message: 'No fields to update' },
                _hints: ['Provide at least one field to update: title, allowDownload, or password.'],
              }),
            },
          ],
          isError: true,
        };
      }
    
      const result = await patch(`/v1/artifacts/${id}`, updates);
    
      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 }) }],
      };
    }
Behavior2/5

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

No annotations provided, so description carries full burden. Identifies the operation as an update/mutation, but omits critical behavioral details: error handling for non-existent IDs, whether changes are immediate, authentication requirements, or the return value structure.

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

Conciseness5/5

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

Single sentence with efficient em-dash enumeration. Every clause earns its place: subject establishes operation, 'existing' establishes scope, and the list clarifies which settings are mutable. No redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Appropriate for a 4-parameter mutation tool with complete schema documentation. Covers the primary updatable fields but leaves gaps in behavioral context expected for a write operation, particularly given the absence of annotations and output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing a baseline of 3. Description adds semantic grouping by categorizing the fields as 'settings' and maps 'allowDownload' to 'download permissions,' but doesn't elaborate on parameter interactions (e.g., that empty password string removes protection, which is only in the schema description).

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

Purpose5/5

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

Specific verb 'Update' + resource 'artifact' + explicit field list (title, download permissions, password protection). The phrase 'existing artifact' effectively distinguishes this from sibling tools like prismism_register (creation) and prismism_delete (removal).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies prerequisite by specifying 'existing artifact,' suggesting the ID must reference an already-created item. However, lacks explicit when-to-use guidance versus siblings like prismism_publish or prismism_register, and doesn't state that only the ID is required for partial updates.

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

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