Skip to main content
Glama
delano
by delano

create_api

Creates a new API by specifying its name, summary, description, and target workspace ID.

Instructions

Create a new API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAPI name
summaryNoBrief description
descriptionNoDetailed description (supports Markdown)
workspaceIdYesTarget workspace ID

Implementation Reference

  • The handler function that executes the 'create_api' tool logic. Validates that name and workspaceId are provided, then sends a POST request to /apis with the data.
    async createApi(data: any): Promise<ToolCallResponse> {
      if (!data.name || !data.workspaceId) {
        throw new McpError(ErrorCode.InvalidParams, 'name and workspaceId are required');
      }
      const response = await this.client.post('/apis', data);
      return this.createResponse(response.data);
    }
  • The tool registration (schema definition) for 'create_api', defining its inputSchema with optional fields 'name', 'summary', 'description', and 'workspaceId', with required fields 'name' and 'workspaceId'.
    {
      name: 'create_api',
      description: 'Create a new API',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'API name',
          },
          summary: {
            type: 'string',
            description: 'Brief description',
          },
          description: {
            type: 'string',
            description: 'Detailed description (supports Markdown)',
          },
          workspaceId: {
            type: 'string',
            description: 'Target workspace ID',
          },
        },
        required: ['name', 'workspaceId'],
      },
    },
  • The dispatch case in handleToolCall that routes the 'create_api' tool name to the createApi handler method.
    case 'create_api':
      return await this.createApi(args);
  • TypeScript interface defining the shape of the CreateApiRequest, including name, workspaceId, summary, and description fields.
    export interface CreateApiRequest {
      name: string;
      workspaceId: string;
      summary?: string;
      description?: string;
    }
Behavior2/5

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

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It only states the generic action without revealing if the operation is idempotent, destructive, requires specific permissions, or has side effects.

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

Conciseness3/5

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

The description is concise at one sentence, but it is under-specified for a creation tool with multiple parameters and likely complex behavior. It lacks structure (e.g., sections or examples) that could aid usability.

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 the absence of an output schema and annotations, the description should explain return values, side effects, or success indicators. It does not cover these, leaving the agent without crucial context for a four-parameter creation tool.

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%, with all four parameters described adequately. The description adds no additional meaning beyond what is already in the input schema, so it meets the baseline of 3.

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 'Create a new API' clearly states the verb and resource, but it lacks differentiation from sibling tools like create_api_version or add_api_collection. It does not specify what 'API' means in this context or any scope details.

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 on when to use this tool versus alternatives. There is no mention of prerequisites, required workspace configurations, or which sibling tools might be more appropriate for different scenarios.

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/delano/postman-mcp-server'

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