Skip to main content

Project Structure

Tools for managing project metadata, structure, and configuration including packages, routes, dependencies, database tables, commands, deployments, and more.

Tools

project_structure_get_metadata

Retrieves complete project structure metadata including packages, routes, dependencies, and configurations.

Parameters:

ParameterTypeRequiredDescription
workspacePathstringNoOptional workspace path to get metadata for

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_get_metadata", {});

project_structure_update_metadata

Updates workspace metadata such as name, description, and version.

Parameters:

ParameterTypeRequiredDescription
updatesobjectYesKey-value pairs of metadata fields to update
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_metadata", {
updates: {
name: "my-project",
version: "1.0.0",
description: "My awesome project"
}
});

project_structure_get_packages

Retrieves all packages in the workspace with their metadata.

Parameters:

ParameterTypeRequiredDescription
workspacePathstringNoOptional workspace path to get packages for

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_get_packages", {});

project_structure_get_package

Retrieves a specific package by its ID with all its metadata.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to retrieve
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_get_package", {
packageId: "frontend-app"
});

project_structure_create_package

Creates a new package in the project structure with the specified name, path, and optional metadata.

Parameters:

ParameterTypeRequiredDescription
namestringYesName of the package
pathstringYesPath of the package
descriptionstringNoOptional description of the package
typestringNoType of the package. One of: frontend, backend, shared, library, service
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_create_package", {
name: "api-service",
path: "./packages/api",
description: "Backend API service",
type: "backend"
});

project_structure_update_package

Updates an existing package with new name, description, or type.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to update
namestringNoNew name for the package
descriptionstringNoNew description for the package
typestringNoNew type for the package. One of: frontend, backend, shared, library, service
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_package", {
packageId: "api-service",
description: "Updated API service description",
type: "service"
});

project_structure_delete_package

Deletes a package from the project structure by its ID.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to delete
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_delete_package", {
packageId: "deprecated-package"
});

project_structure_add_route

Adds an API route to a package with path, method, and optional metadata.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to add the route to
pathstringYesPath of the API route
methodstringYesHTTP method for the route. One of: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
descriptionstringNoDescription of the route
handlerstringNoHandler function name
filestringNoFile path containing the handler
authbooleanNoWhether authentication is required
tagsstring[]NoTags for the route
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_add_route", {
packageId: "api-service",
path: "/api/users",
method: "GET",
description: "Get all users",
handler: "getAllUsers",
file: "src/controllers/users.ts",
auth: true,
tags: ["users", "api"]
});

project_structure_update_route

Updates an existing API route with new path, method, or other properties.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the route
routeIdstringYesID of the route to update
pathstringNoNew path for the route
methodstringNoNew HTTP method. One of: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
descriptionstringNoNew description
handlerstringNoNew handler function name
filestringNoNew file path
authbooleanNoNew authentication requirement
tagsstring[]NoNew tags
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_route", {
packageId: "api-service",
routeId: "route-123",
description: "Updated route description",
auth: false
});

project_structure_delete_route

Deletes an API route from a package by its ID.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the route
routeIdstringYesID of the route to delete
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_delete_route", {
packageId: "api-service",
routeId: "route-123"
});

project_structure_add_table

Adds a database table definition to a package with columns and optional indexes.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to add the table to
namestringYesName of the database table
columnsarrayYesColumn definitions for the table (see column structure below)
descriptionstringNoDescription of the table
indexesstring[]NoIndex definitions
workspacePathstringNoOptional workspace path

Column Structure:

PropertyTypeRequiredDescription
namestringYesColumn name
typestringYesColumn data type
nullablebooleanNoWhether the column is nullable
primaryKeybooleanNoWhether the column is a primary key
foreignKeystringNoForeign key reference
defaultValuestringNoDefault value for the column

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_add_table", {
packageId: "api-service",
name: "users",
description: "Users table",
columns: [
{ name: "id", type: "uuid", primaryKey: true },
{ name: "email", type: "varchar(255)", nullable: false },
{ name: "created_at", type: "timestamp", defaultValue: "NOW()" }
],
indexes: ["email"]
});

project_structure_update_table

Updates an existing database table with new name, columns, or indexes.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the table
tableIdstringYesID of the table to update
namestringNoNew name for the table
descriptionstringNoNew description
columnsarrayNoNew column definitions
indexesstring[]NoNew index definitions
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_table", {
packageId: "api-service",
tableId: "table-123",
description: "Updated users table",
indexes: ["email", "created_at"]
});

project_structure_delete_table

Deletes a database table from a package by its ID.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the table
tableIdstringYesID of the table to delete
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_delete_table", {
packageId: "api-service",
tableId: "table-123"
});

project_structure_add_dependency

Adds a dependency to a package with name, version, and type.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to add the dependency to
namestringYesName of the dependency
versionstringYesVersion of the dependency
typestringYesType of dependency. One of: runtime, dev, peer, optional
descriptionstringNoDescription of the dependency
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_add_dependency", {
packageId: "frontend-app",
name: "react",
version: "^18.2.0",
type: "runtime",
description: "React library for building UIs"
});

project_structure_update_dependency

Updates an existing dependency with new name, version, or type.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the dependency
dependencyIdstringYesID of the dependency to update
namestringNoNew name for the dependency
versionstringNoNew version
typestringNoNew dependency type. One of: runtime, dev, peer, optional
descriptionstringNoNew description
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_dependency", {
packageId: "frontend-app",
dependencyId: "dep-123",
version: "^18.3.0"
});

project_structure_delete_dependency

Deletes a dependency from a package by its ID.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the dependency
dependencyIdstringYesID of the dependency to delete
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_delete_dependency", {
packageId: "frontend-app",
dependencyId: "dep-123"
});

project_structure_add_command

Adds a run command to a package with name and command string.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to add the command to
namestringYesName of the command
commandstringYesCommand string to execute
descriptionstringNoDescription of the command
cwdstringNoWorking directory for the command
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_add_command", {
packageId: "frontend-app",
name: "dev",
command: "npm run dev",
description: "Start development server",
cwd: "./packages/frontend"
});

project_structure_update_command

Updates an existing run command with new name, command string, or working directory.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the command
commandIdstringYesID of the command to update
namestringNoNew name for the command
commandstringNoNew command string
descriptionstringNoNew description
cwdstringNoNew working directory
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_command", {
packageId: "frontend-app",
commandId: "cmd-123",
command: "npm run start",
description: "Start production server"
});

project_structure_delete_command

Deletes a run command from a package by its ID.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the command
commandIdstringYesID of the command to delete
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_delete_command", {
packageId: "frontend-app",
commandId: "cmd-123"
});

project_structure_add_ui_route

Adds a UI route to a package with path, component, and optional metadata.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to add the route to
pathstringYesPath of the UI route
componentstringNoComponent name for the route
filestringNoFile path containing the component
descriptionstringNoDescription of the route
authbooleanNoWhether authentication is required
layoutstringNoLayout name to use
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_add_ui_route", {
packageId: "frontend-app",
path: "/dashboard",
component: "Dashboard",
file: "src/pages/Dashboard.tsx",
description: "Main dashboard page",
auth: true,
layout: "MainLayout"
});

project_structure_update_ui_route

Updates an existing UI route with new path, component, or other properties.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the route
routeIdstringYesID of the route to update
pathstringNoNew path for the route
componentstringNoNew component name
filestringNoNew file path
descriptionstringNoNew description
authbooleanNoNew authentication requirement
layoutstringNoNew layout name
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_ui_route", {
packageId: "frontend-app",
routeId: "ui-route-123",
layout: "AdminLayout",
auth: true
});

project_structure_delete_ui_route

Deletes a UI route from a package by its ID.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the route
routeIdstringYesID of the route to delete
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_delete_ui_route", {
packageId: "frontend-app",
routeId: "ui-route-123"
});

project_structure_add_deployment

Adds a deployment configuration to a package with name, type, and optional config.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to add the deployment to
namestringYesName of the deployment configuration
typestringYesType of deployment. One of: docker, kubernetes, serverless, static, custom
descriptionstringNoDescription of the deployment
configobjectNoAdditional configuration object
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_add_deployment", {
packageId: "api-service",
name: "production",
type: "kubernetes",
description: "Production Kubernetes deployment",
config: {
replicas: 3,
namespace: "production"
}
});

project_structure_update_deployment

Updates an existing deployment configuration with new name, type, or config.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the deployment
configIdstringYesID of the deployment config to update
namestringNoNew name for the deployment
typestringNoNew deployment type. One of: docker, kubernetes, serverless, static, custom
descriptionstringNoNew description
configobjectNoNew configuration object
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_deployment", {
packageId: "api-service",
configId: "deploy-123",
config: {
replicas: 5,
namespace: "production"
}
});

project_structure_delete_deployment

Deletes a deployment configuration from a package by its ID.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package containing the deployment
configIdstringYesID of the deployment config to delete
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_delete_deployment", {
packageId: "api-service",
configId: "deploy-123"
});

project_structure_update_git

Updates git information including repository URL, branch, and remote settings.

Parameters:

ParameterTypeRequiredDescription
repositorystringNoRepository URL
branchstringNoCurrent branch name
remotestringNoRemote name
mainBranchstringNoMain branch name
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_git", {
repository: "https://github.com/user/repo.git",
branch: "develop",
remote: "origin",
mainBranch: "main"
});

project_structure_update_design_guidelines

Updates design guidelines for a package including colors, fonts, spacing, and components.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to update
colorsobjectNoColor palette as key-value pairs
fontsstring[]NoList of fonts
spacingobjectNoSpacing definitions as key-value pairs
componentsstring[]NoList of component names
customGuidelinesstringNoCustom guidelines text
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_design_guidelines", {
packageId: "frontend-app",
colors: {
primary: "#3498db",
secondary: "#2ecc71",
background: "#ffffff"
},
fonts: ["Inter", "Roboto", "monospace"],
spacing: {
small: "8px",
medium: "16px",
large: "32px"
},
components: ["Button", "Card", "Modal"],
customGuidelines: "Use consistent border-radius of 8px for all components"
});

project_structure_update_frontend_framework

Updates the frontend framework information for a package including name, version, and config.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to update
namestringYesName of the framework (e.g., React, Vue, Angular)
versionstringNoFramework version
descriptionstringNoDescription of the framework setup
configobjectNoAdditional configuration object
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_frontend_framework", {
packageId: "frontend-app",
name: "React",
version: "18.2.0",
description: "React with TypeScript and Vite",
config: {
typescript: true,
bundler: "vite"
}
});

project_structure_update_section

Updates a specific section of a package with custom data.

Parameters:

ParameterTypeRequiredDescription
packageIdstringYesID of the package to update
sectionstringYesName of the section to update
sectionDataanyYesData to set for the section (can be any type)
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool("codebolt.projectStructure", "project_structure_update_section", {
packageId: "api-service",
section: "environment",
sectionData: {
development: {
port: 3000,
database: "localhost"
},
production: {
port: 8080,
database: "db.example.com"
}
}
});