Skip to main content
Glama
njlnaet
by njlnaet

Create CoderSwap Project

coderswap_create_project

Create a new vector search project to build topic-specific knowledge bases for semantic search and research workflows.

Instructions

Create a new vector search project in CoderSwap

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
descriptionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
statusNo
project_idYes

Implementation Reference

  • MCP tool handler function that calls CoderSwapClient.createProject, processes the response, and returns formatted success/error output.
    async ({ name, description }) => {
      try {
        log('debug', 'Creating project', { name, description })
        const project: any = await client.createProject({ name, description })
    
        const output = {
          project_id: project.project_id,
          name: project.name || name,
          status: project.status
        }
    
        log('info', `Created project: ${project.project_id}`)
    
        return {
          content: [{
            type: 'text',
            text: `✓ Created project "${name}" (ID: ${project.project_id})`
          }],
          structuredContent: output
        }
      } catch (error) {
        log('error', 'Failed to create project', { error: error instanceof Error ? error.message : error })
        return {
          content: [{
            type: 'text',
            text: `✗ Failed to create project: ${error instanceof Error ? error.message : 'Unknown error'}`
          }],
          isError: true
        }
      }
    }
  • src/index.ts:190-235 (registration)
    Registration of the 'coderswap_create_project' tool with schema and inline handler function.
      'coderswap_create_project',
      {
        title: 'Create CoderSwap Project',
        description: 'Create a new vector search project in CoderSwap',
        inputSchema: {
          name: z.string().min(1, 'Project name is required'),
          description: z.string().optional()
        },
        outputSchema: {
          project_id: z.string(),
          name: z.string(),
          status: z.string().optional()
        }
      },
      async ({ name, description }) => {
        try {
          log('debug', 'Creating project', { name, description })
          const project: any = await client.createProject({ name, description })
    
          const output = {
            project_id: project.project_id,
            name: project.name || name,
            status: project.status
          }
    
          log('info', `Created project: ${project.project_id}`)
    
          return {
            content: [{
              type: 'text',
              text: `✓ Created project "${name}" (ID: ${project.project_id})`
            }],
            structuredContent: output
          }
        } catch (error) {
          log('error', 'Failed to create project', { error: error instanceof Error ? error.message : error })
          return {
            content: [{
              type: 'text',
              text: `✗ Failed to create project: ${error instanceof Error ? error.message : 'Unknown error'}`
            }],
            isError: true
          }
        }
      }
    )
  • Core helper method in CoderSwapClient that performs the HTTP POST request to create a project via the API, setting embedding_dim to 384.
    async createProject(input: CreateProjectInput) {
      const res = await fetch(`${this.baseUrl}/v1/projects`, {
        method: 'POST',
        headers: this.headers,
        body: JSON.stringify({
          name: input.name,
          description: input.description,
          embedding_dim: 384
        })
      })
      return this.handleResponse(res)
    }
  • Zod schema definition for CreateProjectInput used by the client and matching the tool's inputSchema.
    export const createProjectSchema = z.object({
      name: z.string().min(1, 'Project name is required'),
      description: z.string().optional()
    })
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. It states the tool creates something but doesn't mention permissions required, whether this is idempotent, what happens on duplicate names, rate limits, or what the output contains. For a creation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 a single, efficient sentence that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, making it easy to parse quickly.

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?

Given the tool creates a project (a mutation operation) with no annotations and an output schema exists, the description is minimally complete. It identifies the action and resource but lacks details on behavior, parameters, or context. The output schema may cover return values, but the description doesn't address permissions, errors, or integration with sibling tools.

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?

The description adds no parameter semantics beyond what the schema provides. With 0% schema description coverage, the schema documents the parameters (name, description) but without descriptions. The description doesn't explain what 'name' or 'description' represent in context, their constraints, or examples. However, with only 2 parameters and a simple structure, the baseline is 3 as the schema provides basic typing.

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

Purpose4/5

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

The description clearly states the action ('Create') and resource ('new vector search project in CoderSwap'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'coderswap_list_projects' or 'coderswap_research_ingest' in terms of when to use creation versus other operations.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, when creation is appropriate versus listing existing projects, or any context about the project lifecycle. Users must infer usage from the tool name alone.

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

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