info
Retrieve project or workflow structure information to understand organization and dependencies for better development and automation planning.
Instructions
Get project or workflow structure information
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | Project name |
Input Schema (JSON Schema)
{
"properties": {
"project": {
"description": "Project name",
"type": "string"
}
},
"required": [
"project"
],
"type": "object"
}
Implementation Reference
- src/tools/handler.ts:51-52 (handler)Handler implementation for the 'info' tool. Dispatches the tool call to WorkflowManager.getProjectInfo with optional project argument.case 'info': return await this.workflowManager.getProjectInfo(args?.project as string);
- src/tools/registry.ts:90-99 (schema)Input schema definition for the 'info' tool, requiring a 'project' parameter.inputSchema: { type: 'object', properties: { project: { type: 'string', description: 'Project name', }, }, required: ['project'], },
- src/tools/registry.ts:87-100 (registration)Tool registration in getToolDefinitions array, defining name, description, and schema for the 'info' tool.{ name: 'info', description: 'Get project or workflow structure information', inputSchema: { type: 'object', properties: { project: { type: 'string', description: 'Project name', }, }, required: ['project'], }, },
- src/workflows/manager.ts:497-586 (helper)Core implementation of project information retrieval in WorkflowManager.getProjectInfo. Handles simple and multi-project structures, lists workflows, checks for README and .env.example presence.async getProjectInfo(project?: string): Promise<any> { try { if (this.structure.type === 'simple') { // Simple structure: return info about the single workflows folder const info: any = { type: 'simple', workflowsPath: 'workflows/', workflows: [], }; const workflowsDir = this.workflowsPath; // Already points to workflows folder try { const files = await fs.readdir(workflowsDir); info.workflows = files.filter(f => f.endsWith('.json')).map(f => f.replace('.json', '')); } catch {} // Check for README and .env try { await fs.access(path.join(this.workflowsPath, 'README.md')); info.hasReadme = true; } catch {} try { await fs.access(path.join(this.workflowsPath, '.env.example')); info.hasEnvExample = true; } catch {} return { content: [ { type: 'text', text: JSON.stringify(info, null, 2), }, ], }; } else if (this.structure.type === 'multi-project') { if (project) { // Get info for specific project const projectPath = path.join(this.workflowsPath, project); const info: any = { name: project, type: 'multi-project', workflows: [], }; const workflowsDir = path.join(projectPath, 'workflows'); try { const files = await fs.readdir(workflowsDir); info.workflows = files.filter(f => f.endsWith('.json')).map(f => f.replace('.json', '')); } catch {} return { content: [ { type: 'text', text: JSON.stringify(info, null, 2), }, ], }; } else { // List all projects return { content: [ { type: 'text', text: JSON.stringify({ type: 'multi-project', projects: this.structure.projects || [], }, null, 2), }, ], }; } } return { content: [ { type: 'text', text: JSON.stringify({ type: 'unknown', message: 'Could not determine project structure', }, null, 2), }, ], }; } catch (error) { throw new Error(`Failed to get project info: ${error}`); } }