Skip to main content
Glama
sweetwisdom

MCP Project Query Server

by sweetwisdom

get_project_count

Retrieve the total number of projects managed by the MCP Project Query Server to monitor project inventory and track system usage.

Instructions

获取项目总数

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the MCP tool 'get_project_count' with empty input schema and a handler that delegates to ProjectController.getProjectCount().
    server.tool(
        'get_project_count',
        '获取项目总数',
        {},
        async () => {
            return projectController.getProjectCount();
        }
    );
  • The main handler function for the tool, retrieves project count from service and formats it as an MCP response with text content.
    getProjectCount(): { content: Array<{ type: "text"; text: string }> } {
      const count = this.projectService.getProjectCount();
      return {
        content: [
          {
            type: 'text',
            text: `项目总数: ${count}`,
          },
        ],
      };
    }
  • Helper method in ProjectService that delegates the project count retrieval to the repository.
    getProjectCount(): number {
      return this.projectRepository.getProjectCount();
    }
  • Core implementation in ProjectRepository that returns the length of the in-memory projects array.
    getProjectCount(): number {
      return this.projects.length;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. '获取项目总数' only states what the tool does, not how it behaves. It doesn't disclose whether this is a cached count or real-time calculation, what permissions are required, whether it's rate-limited, what format the count is returned in (integer, string with formatting), or any error conditions. For a tool with zero annotation coverage, this is insufficient behavioral disclosure.

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

Conciseness5/5

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

The description is extremely concise - just three Chinese characters that directly state the tool's function. There's zero waste or unnecessary elaboration. For a simple count retrieval tool, this minimal description is appropriately sized and front-loaded with the essential information.

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

Completeness2/5

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

Given no annotations, no output schema, and a simple but potentially ambiguous purpose relative to siblings, the description is incomplete. It doesn't explain what 'count' means (total projects? active projects?), what the return value looks like, or how this differs from 'get_project_all'. For a tool that could have various interpretations in a project management context, more context is needed.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage (empty schema). The description doesn't need to explain any parameters since none exist. The baseline for 0 parameters is 4, as there's no parameter information to provide beyond what the schema already indicates (no parameters).

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

Purpose3/5

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

The description '获取项目总数' (Get project count) states a clear verb ('获取' - get) and resource ('项目总数' - project count), which establishes the basic purpose. However, it doesn't differentiate from sibling tools like 'get_project_all' or 'get_project_info' - it's unclear if this returns just a number while others return detailed lists or information. The purpose is clear but lacks sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_project_all' (presumably listing all projects) and 'get_project_info' (presumably getting detailed info about specific projects), there's no indication whether this tool should be used for quick counts, summary statistics, or dashboard metrics versus the other retrieval tools.

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/sweetwisdom/mcp-demo'

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