Skip to main content
Glama
comet-ml

Opik MCP Server

by comet-ml

create-prompt

Generate a new prompt by specifying its name, enabling structured input creation within the Opik platform's Model Context Protocol environment.

Instructions

Create a new prompt

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the prompt

Implementation Reference

  • Handler function for 'create-prompt' tool that sends a POST request to create a new prompt with name, optional description and tags.
    async (args: any) => {
      const { name, description, tags } = args;
      const requestBody: any = { name };
      if (description) requestBody.description = description;
      if (tags) requestBody.tags = tags;
    
      const response = await makeApiRequest<any>(`/v1/private/prompts`, {
        method: 'POST',
        body: JSON.stringify(requestBody),
      });
    
      return {
        content: [
          {
            type: 'text',
            text: response.error || 'Successfully created prompt',
          },
        ],
      };
    }
  • Input schema using Zod for validating arguments: name (required string), description (optional string), tags (optional array of strings).
    {
      name: z.string().min(1).describe('Name of the prompt'),
      description: z.string().optional().describe('Description of the prompt'),
      tags: z.array(z.string()).optional().describe('List of tags for the prompt'),
    },
  • Registration of the 'create-prompt' tool using server.tool, including name, description, schema, and handler function.
    server.tool(
      'create-prompt',
      'Create a new prompt',
      {
        name: z.string().min(1).describe('Name of the prompt'),
        description: z.string().optional().describe('Description of the prompt'),
        tags: z.array(z.string()).optional().describe('List of tags for the prompt'),
      },
      async (args: any) => {
        const { name, description, tags } = args;
        const requestBody: any = { name };
        if (description) requestBody.description = description;
        if (tags) requestBody.tags = tags;
    
        const response = await makeApiRequest<any>(`/v1/private/prompts`, {
          method: 'POST',
          body: JSON.stringify(requestBody),
        });
    
        return {
          content: [
            {
              type: 'text',
              text: response.error || 'Successfully created prompt',
            },
          ],
        };
      }
    );
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Create a new prompt' implies a write/mutation operation but provides no details about permissions needed, whether creation is idempotent, what happens on conflicts, or what the response contains. This leaves significant behavioral gaps for a creation tool.

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?

The description is extremely concise at just three words. While it's under-specified in content, it's not verbose or poorly structured. Every word earns its place in this minimal description.

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?

For a creation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what a 'prompt' is in this context, what fields beyond 'name' might be set by default, what the creation response looks like, or how this differs from similar tools. The description fails to provide necessary context for effective tool use.

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 description coverage is 100%, so the schema already documents the single 'name' parameter. The description adds no additional parameter context beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description.

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

Purpose2/5

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

The description 'Create a new prompt' is a tautology that restates the tool name without adding specificity. It doesn't distinguish this tool from sibling tools like 'create-prompt-version' or explain what kind of prompt is being created. The purpose is minimally stated but lacks meaningful differentiation.

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

Usage Guidelines1/5

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

No guidance is provided about when to use this tool versus alternatives like 'create-prompt-version' or 'update-prompt'. There's no mention of prerequisites, constraints, or appropriate contexts for invoking this creation tool versus other prompt-related operations.

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

Related 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/comet-ml/opik-mcp'

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