org_create
Create new organizations in the tpm-mcp project management system to establish hierarchical structures for tracking projects, features, and tasks.
Instructions
PROJECT MANAGEMENT: Create a new organization (rarely needed).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Organization name |
Implementation Reference
- src/tpm_mcp/server.py:500-502 (handler)Handler function for the 'org_create' tool. Parses the input arguments, creates an OrgCreate model instance, calls db.create_org to persist the organization, and returns a formatted JSON response.if name == "org_create": org = db.create_org(OrgCreate(name=args["name"])) return f"Created org: {_json(org)}"
- src/tpm_mcp/server.py:438-445 (registration)Registration of the 'org_create' tool in the list_tools() decorator, including name, description, and JSON schema for input validation.name="org_create", description="PROJECT MANAGEMENT: Create a new organization (rarely needed).", inputSchema={ "type": "object", "properties": {"name": {"type": "string", "description": "Organization name"}}, "required": ["name"], }, ),
- src/tpm_mcp/models.py:48-49 (schema)Pydantic schema model OrgCreate used for input validation and type hints in the org_create tool handler.class OrgCreate(BaseModel): name: str
- src/tpm_mcp/db.py:108-116 (helper)Core database helper method that generates a UUID ID, inserts the organization into the 'orgs' SQLite table, commits the transaction, and returns an Org model instance.def create_org(self, data: OrgCreate) -> Org: id = self._gen_id() now = self._now() self.conn.execute( "INSERT INTO orgs (id, name, created_at) VALUES (?, ?, ?)", (id, data.name, now) ) self.conn.commit() return Org(id=id, name=data.name, created_at=datetime.fromisoformat(now))