Skip to main content
Glama
pushkarsingh32

Semantic Pen MCP Server

get_projects

Retrieve all projects from your article queue to manage and organize content creation workflows.

Instructions

Get all projects from your article queue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_projects' tool. Fetches projects from the SemanticPen API endpoint '/article-queue', groups duplicate entries by project_id, computes total article counts per project, formats a rich text response listing all projects, and handles errors.
    private async getProjects() {
      const result = await this.makeRequest<ProjectQueueResponse>('/article-queue');
      
      if (result.success && result.data) {
        const projects = result.data.data.projects;
        
        // Group by project name and get unique projects
        const uniqueProjects = projects.reduce((acc: { [key: string]: Project & { totalArticles: number } }, project) => {
          if (!acc[project.project_id]) {
            acc[project.project_id] = {
              ...project,
              totalArticles: 1
            };
          } else {
            acc[project.project_id].totalArticles += 1;
          }
          return acc;
        }, {});
    
        const projectList = Object.values(uniqueProjects).map(project => 
          `📁 **${project.project_name}** (${project.totalArticles} articles)\n   Project ID: ${project.project_id}\n   Latest Article: ${project.extra_data.targetArticleTopic}\n   Created: ${new Date(project.created_at).toLocaleDateString()}\n   Status: ${project.status}`
        ).join('\n\n');
    
        return {
          content: [
            {
              type: "text",
              text: `📋 **Your Projects** (${Object.keys(uniqueProjects).length} projects, ${result.data.count} total articles)\n\n${projectList || 'No projects found.'}`
            }
          ]
        };
      } else {
        return {
          content: [
            {
              type: "text",
              text: `❌ Failed to fetch projects: ${result.error}`
            }
          ],
          isError: true
        };
      }
    }
  • src/index.ts:195-202 (registration)
    Registration of the 'get_projects' tool in the ListToolsRequest handler, specifying its name, description, and empty input schema (no parameters required).
    {
      name: "get_projects",
      description: "Get all projects from your article queue",
      inputSchema: {
        type: "object",
        properties: {}
      }
    },
  • src/index.ts:292-293 (registration)
    Dispatch logic in the CallToolRequest handler that matches the tool name and invokes the getProjects handler method.
    case "get_projects":
      return await this.getProjects();
  • TypeScript interface defining the structure of a Project object returned from the API, used in the getProjects handler for type safety and processing.
    interface Project {
      id: string;
      created_at: string;
      status: string;
      statusDetails: string;
      progress: number;
      error: string | null;
      project_id: string;
      project_name: string;
      extra_data: {
        targetArticleTopic: string;
      };
      article_count: number;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It implies a read-only operation via 'Get' and defines the scope as 'all projects from your article queue', but it does not disclose potential caveats like whether archived projects are included, pagination, or limits. This is adequate for a simple read tool but lacks rich behavioral context.

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, focused sentence that gets straight to the point with no wasted words. It is perfectly concise for a simple list-all tool.

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

Completeness4/5

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

For a parameterless tool with no output schema, the description provides sufficient context: it states what is returned (all projects) and the source scope. While it does not describe the return format, the plural 'projects' implies a list, making it reasonably complete. However, adding a note about what a 'project' is might improve completeness.

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 zero parameters and the schema coverage is 100%, so the description does not need to explain parameter meanings. Per the rubric, a baseline of 4 is appropriate when there are no params.

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's purpose: to retrieve all projects within a specific scope ('your article queue'). The verb 'Get' and plural 'projects' make it distinct from sibling tools like 'search_projects' (which implies filtering) and 'get_project_articles' (which targets articles, not projects).

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 'search_projects'. It does not explicitly mention exclusions or prerequisites, leaving the agent to infer that this is the go-to for listing all projects.

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