check_project
Validate project secrets against the manifest to identify present, missing, expired, or stale credentials and verify project readiness.
Instructions
Validate project secrets against the .q-ring.json manifest. Returns which required secrets are present, missing, expired, or stale. Use this to verify project readiness.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | No | Project root path for project-scoped secrets |
Implementation Reference
- src/mcp/server.ts:338-393 (handler)The tool 'check_project' is registered and implemented in src/mcp/server.ts. It validates project secrets by reading the .q-ring.json manifest and checking the status (present, missing, expired, stale) of each secret.
server.tool( "check_project", "Validate project secrets against the .q-ring.json manifest. Returns which required secrets are present, missing, expired, or stale. Use this to verify project readiness.", { projectPath: projectPathSchema, }, async (params) => { const projectPath = params.projectPath ?? process.cwd(); const config = readProjectConfig(projectPath); if (!config?.secrets || Object.keys(config.secrets).length === 0) { return text("No secrets manifest found in .q-ring.json", true); } const results: Record<string, unknown>[] = []; let presentCount = 0; let missingCount = 0; let expiredCount = 0; let staleCount = 0; for (const [key, manifest] of Object.entries(config.secrets)) { const result = getEnvelope(key, { projectPath, source: "mcp" }); if (!result) { const status = manifest.required !== false ? "missing" : "optional_missing"; if (manifest.required !== false) missingCount++; results.push({ key, status, required: manifest.required !== false, description: manifest.description }); continue; } const decay = checkDecay(result.envelope); if (decay.isExpired) { expiredCount++; results.push({ key, status: "expired", timeRemaining: decay.timeRemaining, description: manifest.description }); } else if (decay.isStale) { staleCount++; results.push({ key, status: "stale", lifetimePercent: decay.lifetimePercent, timeRemaining: decay.timeRemaining, description: manifest.description }); } else { presentCount++; results.push({ key, status: "ok", description: manifest.description }); } } const summary = { total: Object.keys(config.secrets).length, present: presentCount, missing: missingCount, expired: expiredCount, stale: staleCount, ready: missingCount === 0 && expiredCount === 0, secrets: results, }; return text(JSON.stringify(summary, null, 2)); },