Skip to main content
Glama
bsdnn
by bsdnn

getProjectInfo

Retrieve project statistics including file count, symbol count, critical point count, and detected languages to understand codebase scale.

Instructions

Get project statistics: file count, symbol count, critical point count, languages detected

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:145-153 (registration)
    The tool 'getProjectInfo' is registered in the getAvailableTools() array with name, description, and an empty inputSchema (no params required).
    {
      name: 'getProjectInfo',
      description: 'Get project statistics: file count, symbol count, critical point count, languages detected',
      inputSchema: {
        type: 'object' as const,
        properties: {},
        required: [],
      },
    },
  • The handler function handleGetProjectInfo() builds a markdown report with project name, language, root path, symbol count, edge count, critical point count, symbol type distribution, and critical point type distribution using data from codeAnalyzer.
    private async handleGetProjectInfo(): Promise<{ content: TextContent[] }> {
      const config = this.configManager.getConfig();
    
      let result = `# 📊 项目信息\n\n`;
      result += `**名称:** ${config.project.name}\n`;
      result += `**语言:** ${config.project.languages.join(', ')}\n`;
      result += `**根路径:** ${config.project.rootPath}\n\n`;
    
      if (this.codeAnalyzer) {
        const symbols = this.codeAnalyzer.getAllSymbols();
        const edges = this.codeAnalyzer.getResolvedEdges();
        const cps = this.codeAnalyzer.getCriticalPoints();
    
        result += `## 📈 分析统计\n\n`;
        result += `- **符号总数:** ${symbols.length}\n`;
        result += `- **调用边:** ${edges.length}\n`;
        result += `- **关键操作:** ${cps.length}\n\n`;
    
        const symbolsByType: Record<string, number> = {};
        for (const symbol of symbols) {
          symbolsByType[symbol.type] = (symbolsByType[symbol.type] || 0) + 1;
        }
        result += `### 符号类型分布\n`;
        for (const [type, count] of Object.entries(symbolsByType)) {
          result += `- ${type}: ${count}\n`;
        }
    
        if (cps.length > 0) {
          const cpByType: Record<string, number> = {};
          for (const cp of cps) {
            cpByType[cp.type] = (cpByType[cp.type] || 0) + 1;
          }
          result += `\n### 关键操作分布\n`;
          for (const [type, count] of Object.entries(cpByType)) {
            result += `- ${type}: ${count}\n`;
          }
        }
      }
    
      return {
        content: [
          {
            type: 'text',
            text: result,
          },
        ],
      };
    }
  • src/index.ts:179-180 (registration)
    The tool dispatch in handleToolCall routes the 'getProjectInfo' tool name to handleGetProjectInfo().
    case 'getProjectInfo':
      return this.handleGetProjectInfo();
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must bear full responsibility for behavioral disclosure. It states what statistics are returned but does not mention read-only behavior, authorization needs, rate limits, or whether data is live.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single concise sentence that conveys the purpose without waste. However, it could benefit from a brief additional sentence about usage context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description partially explains the return values (four statistics), but lacks details on format, ordering, or any limits. It is minimally adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters, and coverage is 100%, so baseline is 3. The description adds nothing beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns project statistics and lists specific metrics (file count, symbol count, critical point count, languages detected), which distinguishes it from sibling tools like findCallers or generateFlowDiagram.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as searchSymbols or getCriticalPoints, nor any prerequisites or context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/bsdnn/mcp-code-flow-analyzer'

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