Skip to main content
Glama

list_all_projects

Retrieve all public WebSim projects with pagination controls to browse and explore available content in the community.

Instructions

List all public WebSim projects with pagination

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of projects to return (default: 20)
offsetNoNumber of projects to skip (default: 0)

Input Schema (JSON Schema)

{ "properties": { "limit": { "default": 20, "description": "Number of projects to return (default: 20)", "type": "number" }, "offset": { "default": 0, "description": "Number of projects to skip (default: 0)", "type": "number" } }, "type": "object" }

Implementation Reference

  • The handler function for the list_all_projects MCP tool. It extracts limit and offset from arguments, calls the API client's listAllProjects method, and returns a formatted JSON response with the results.
    handler: async (args) => { const { limit = 20, offset = 0 } = args; const result = await apiClient.listAllProjects(limit, offset); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Successfully retrieved ${result.items?.length || 0} projects (offset: ${offset})` }, null, 2) }] }; }
  • Zod input schema validation is not directly used here, but the JSON schema defines optional limit (default 20) and offset (default 0) parameters for paginating project lists.
    inputSchema: { type: "object", properties: { limit: { type: "number", description: "Number of projects to return (default: 20)", default: 20 }, offset: { type: "number", description: "Number of projects to skip (default: 0)", default: 0 } } },
  • server.js:299-331 (registration)
    The complete tool registration object added to the tools array, which is used by the MCP server to handle list_all_projects tool calls.
    { name: "list_all_projects", description: "List all public WebSim projects with pagination", inputSchema: { type: "object", properties: { limit: { type: "number", description: "Number of projects to return (default: 20)", default: 20 }, offset: { type: "number", description: "Number of projects to skip (default: 0)", default: 0 } } }, handler: async (args) => { const { limit = 20, offset = 0 } = args; const result = await apiClient.listAllProjects(limit, offset); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Successfully retrieved ${result.items?.length || 0} projects (offset: ${offset})` }, null, 2) }] }; } },
  • Helper method in WebSimAPIClient class that makes the HTTP request to fetch paginated list of all public projects from the WebSim API.
    async listAllProjects(limit = 20, offset = 0) { const params = new URLSearchParams({ limit: limit.toString(), offset: offset.toString() }); return this.makeRequest(`/api/v1/projects?${params}`); }

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/gigachadtrey/websimm'

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