Skip to main content
Glama

info

Retrieve project structure and workflow details from McFlow to understand organization and automate development processes.

Instructions

Get project or workflow structure information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesProject name

Implementation Reference

  • The handler case in ToolHandler.handleTool that executes the 'info' tool by calling getProjectInfo on the workflow manager.
    case 'info': return await this.workflowManager.getProjectInfo(args?.project as string);
  • The input schema and definition for the 'info' tool in the tool registry.
    { name: 'info', description: 'Get project or workflow structure information', inputSchema: { type: 'object', properties: { project: { type: 'string', description: 'Project name', }, }, required: ['project'], }, },
  • Registers all tools including 'info' via getToolDefinitions() in the MCP server's listTools handler.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions(), }));
  • Core helper function implementing the project information logic: detects structure, scans directories for workflows, and formats response.
    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}`); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mckinleymedia/mcflow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server