Skip to main content
Glama
pushkarsingh32

Semantic Pen MCP Server

search_projects

Find projects by name using partial matching to locate specific content within the Semantic Pen MCP Server's article management system.

Instructions

Search projects by name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameYesThe project name to search for (partial match)

Implementation Reference

  • The core handler function that implements the search_projects tool logic. It fetches all projects via API, filters by partial case-insensitive match on project_name, deduplicates by project_id while counting articles, and formats a markdown response with matching projects.
    private async searchProjects(projectName: string) {
      const result = await this.makeRequest<ProjectQueueResponse>('/article-queue');
      
      if (result.success && result.data) {
        const allProjects = result.data.data.projects;
        const matchingProjects = allProjects.filter(project => 
          project.project_name.toLowerCase().includes(projectName.toLowerCase())
        );
    
        if (matchingProjects.length === 0) {
          return {
            content: [
              {
                type: "text",
                text: `No projects found matching "${projectName}"`
              }
            ]
          };
        }
    
        // Group by project_id to show unique projects
        const uniqueProjects = matchingProjects.reduce((acc: { [key: string]: Project & { articles: string[] } }, project) => {
          if (!acc[project.project_id]) {
            acc[project.project_id] = {
              ...project,
              articles: [project.extra_data.targetArticleTopic]
            };
          } else {
            acc[project.project_id].articles.push(project.extra_data.targetArticleTopic);
          }
          return acc;
        }, {});
    
        const projectList = Object.values(uniqueProjects).map(project => 
          `📁 **${project.project_name}**\n   Project ID: ${project.project_id}\n   Articles: ${project.articles.length}\n   Latest: ${project.articles[0]}\n   Created: ${new Date(project.created_at).toLocaleDateString()}`
        ).join('\n\n');
    
        return {
          content: [
            {
              type: "text",
              text: `🔍 **Projects matching "${projectName}"** (${Object.keys(uniqueProjects).length} found)\n\n${projectList}`
            }
          ]
        };
      } else {
        return {
          content: [
            {
              type: "text",
              text: `❌ Failed to search projects: ${result.error}`
            }
          ],
          isError: true
        };
      }
    }
  • src/index.ts:217-230 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema for search_projects.
    {
      name: "search_projects",
      description: "Search projects by name",
      inputSchema: {
        type: "object",
        properties: {
          projectName: {
            type: "string",
            description: "The project name to search for (partial match)"
          }
        },
        required: ["projectName"]
      }
    },
  • Input schema specifying that search_projects requires a 'projectName' string parameter with partial match description.
    inputSchema: {
      type: "object",
      properties: {
        projectName: {
          type: "string",
          description: "The project name to search for (partial match)"
        }
      },
      required: ["projectName"]
    }
  • src/index.ts:302-307 (registration)
    Dispatcher in CallToolRequestSchema handler that validates the projectName argument and invokes the searchProjects handler method.
    case "search_projects": {
      if (!args || typeof args !== 'object' || !('projectName' in args) || typeof args.projectName !== 'string') {
        throw new Error("projectName is required and must be a string");
      }
      return await this.searchProjects(args.projectName);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions searching by name but doesn't describe traits like pagination, result format, error handling, or performance implications. For a search tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence with zero waste, front-loading the core functionality ('Search projects by name'). It is appropriately sized for a simple tool with one parameter.

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 the lack of annotations and output schema, the description is incomplete. It doesn't explain what the search returns, how results are structured, or any behavioral nuances. For a search tool, this leaves critical gaps in understanding its operation and output.

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 schema description coverage is 100%, with the parameter 'projectName' documented as 'The project name to search for (partial match)'. The description adds no additional meaning beyond what the schema provides, such as search syntax or examples, so it meets the baseline score when the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the verb ('search') and resource ('projects'), and specifies the search criterion ('by name'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_projects', which might also retrieve projects, so it doesn't reach the highest score.

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 like 'get_projects' or other siblings. It lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage from the name alone.

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/pushkarsingh32/semantic-pen-mcp-server'

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