Skip to main content
Glama

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

NameRequiredDescriptionDefault
projectYesProject name

Input Schema (JSON Schema)

{ "properties": { "project": { "description": "Project name", "type": "string" } }, "required": [ "project" ], "type": "object" }

Implementation Reference

  • 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);
  • Input schema definition for the 'info' tool, requiring a 'project' parameter.
    inputSchema: { type: 'object', properties: { project: { type: 'string', description: 'Project name', }, }, required: ['project'], },
  • 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'], }, },
  • 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}`); } }

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