Skip to main content
Glama

get_projects

Retrieve all projects from your article queue to manage and optimize SEO-friendly content efficiently within the Semantic Pen MCP Server environment.

Instructions

Get all projects from your article queue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function `getProjects()` that executes the tool logic: fetches projects from the '/article-queue' API, groups by project_id, counts articles, formats a markdown summary, and returns in MCP content format.
    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 ListTools response, specifying name, description, and input schema (no parameters required).
    { name: "get_projects", description: "Get all projects from your article queue", inputSchema: { type: "object", properties: {} } },
  • Dispatcher case in the CallToolRequestSchema handler that routes 'get_projects' calls to the getProjects() implementation.
    case "get_projects": return await this.getProjects();
  • Input schema for the 'get_projects' tool, defining an empty object (no input parameters required).
    inputSchema: { type: "object", properties: {} }

Other Tools

Related 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