Skip to main content
Glama

project_create

Create a new project within an organization to manage features and tasks using SQLite-based tracking. Specify organization ID, project name, repository path, and description to establish project structure.

Instructions

PROJECT MANAGEMENT: Create a new project under an organization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
org_idYesOrganization ID (case-insensitive)
nameYesProject name
repo_pathNoPath to git repo
descriptionNoProject description

Implementation Reference

  • MCP tool handler that parses arguments into ProjectCreate model and delegates to db.create_project, returning JSON of created project.
    if name == "project_create": project = db.create_project( ProjectCreate( org_id=args["org_id"], name=args["name"], repo_path=args.get("repo_path"), description=args.get("description"), ) ) return f"Created project: {_json(project)}"
  • Pydantic model ProjectCreate defines the input schema for creating a project: required org_id and name, optional repo_path and description.
    class ProjectCreate(BaseModel): org_id: str name: str repo_path: str | None = None description: str | None = None
  • Registration of the project_create tool in list_tools(), including name, description, and inputSchema matching ProjectCreate model.
    Tool( name="project_create", description="PROJECT MANAGEMENT: Create a new project under an organization.", inputSchema={ "type": "object", "properties": { "org_id": {"type": "string", "description": "Organization ID (case-insensitive)"}, "name": {"type": "string", "description": "Project name"}, "repo_path": {"type": "string", "description": "Path to git repo"}, "description": {"type": "string", "description": "Project description"}, }, "required": ["org_id", "name"], }, ),
  • Database method that inserts new project into SQLite 'projects' table using ProjectCreate data, handles case-insensitive org_id lookup, generates UUID id and timestamp.
    def create_project(self, data: ProjectCreate) -> Project: id = self._gen_id() now = self._now() normalized_org_id = self._normalize_id(data.org_id) # Check if a case-insensitive match already exists for org_id existing_org = self.conn.execute( "SELECT id FROM orgs WHERE LOWER(id) = ?", (normalized_org_id,) ).fetchone() if existing_org: org_id = existing_org["id"] # Use existing org ID else: org_id = normalized_org_id # Use normalized org_id for new entries self.conn.execute( """INSERT INTO projects (id, org_id, name, repo_path, description, created_at) VALUES (?, ?, ?, ?, ?, ?)""", (id, org_id, data.name, data.repo_path, data.description, now), ) self.conn.commit() return Project( id=id, org_id=org_id, name=data.name, repo_path=data.repo_path, description=data.description, created_at=datetime.fromisoformat(now), )

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/urjitbhatia/tpm-mcp'

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