# apps/api/src/schemas/tool
dir: apps/api/src/schemas/tool

index: apps/api/src/schemas/tool/.pi-map.index.md

## role
Provides Pydantic data validation schemas for tool-related API request/response models.
## files
- __init__.py | Re-exports tool-related Pydantic schemas from submodules to provide a unified public interface for the schemas.tool package. | dep: src.schemas.tool.tool_instance, src.schemas.tool.tool_type
- tool_instance.py | Defines Pydantic request/response schemas for tool instance lifecycle operations (create, create-on-workspace, start). | exp: class:CreateInstanceRequest, class:CreateWorkspaceInstanceRequest, class:StartInstanceRequest | dep: pydantic
- tool_type.py | Defines Pydantic request/response schemas for tool type CRUD operations with conditional validation logic based on definition type | exp: class:ToolTypeCreate, class:ToolTypeUpdate, class:ToolTypeResponse, class:ToolTypeValidateRequest | dep: uuid, datetime, pydantic, src.api.tool.tool_types_validation
## arch
Modular schema organization with submodule-per-entity pattern, re-exported through __init__.py for clean imports; uses conditional Pydantic validators for polymorphic definition type handling.
## tags
tool, type, request, instance, create, schemas, pydantic, response
## symbols
- CreateInstanceRequest
- CreateWorkspaceInstanceRequest
- StartInstanceRequest
- ToolTypeCreate
- ToolTypeUpdate
- ToolTypeResponse
- ToolTypeValidateRequest
## workflows
- change tool behavior
  read: __init__.py, tool_instance.py, tool_type.py
## dirty
-
