register_project
Register a project to link it with the CtxNest knowledge system, automatically indexing markdown files and registering declared tools.
Instructions
Register a new project and link it to the CtxNest knowledge system.
SIDE EFFECTS: Writes project metadata to disk (persisted in the CtxNest data directory). Scans the project root recursively to discover and index all markdown files into the local database. Registers any ctxnest.json-declared Hands tools found in the project root. This operation is idempotent — re-registering an existing project updates its metadata without data loss.
AUTH / RATE LIMITS: None. Operates entirely on the local file system.
PARAMETERS:
name: Human-readable project name.
path: Absolute path to the project root. Required. If the user does not specify, use the current working directory. Fails with a descriptive error if the path does not exist or is inaccessible.
description: Optional free-text description stored with the project metadata.
RETURNS: A JSON object containing:
project: { id, name, path, description, created_at }
discovered_files_count: number of markdown files indexed
discovered_files: array of { path, est_tokens, size_bytes } for each file
total_est_tokens: estimated total token cost of all discovered files
hands: { found, tools_registered, tools_disabled, warnings }
warnings: array of non-fatal issues (e.g. scan failures, token budget exceeded)
ERROR CONDITIONS: Returns isError=true if path is missing or unresolvable. Scan failures are non-fatal and reported in warnings rather than as errors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Project name | |
| path | No | Absolute path to the project root. If not provided by the user, use the current working directory. | |
| description | No | Optional project description |