Skip to main content
Glama

get_project_descendants

Retrieve descendant projects from a WebSim project to explore related content and hierarchical relationships within the platform.

Instructions

Get projects that are descendants of a WebSim project

Input Schema

NameRequiredDescriptionDefault
project_idYesWebSim project ID
limitNoNumber of descendants to return (default: 20)
offsetNoNumber of descendants to skip (default: 0)

Input Schema (JSON Schema)

{ "properties": { "limit": { "default": 20, "description": "Number of descendants to return (default: 20)", "type": "number" }, "offset": { "default": 0, "description": "Number of descendants to skip (default: 0)", "type": "number" }, "project_id": { "description": "WebSim project ID", "type": "string" } }, "required": [ "project_id" ], "type": "object" }

Implementation Reference

  • MCP tool handler for 'get_project_descendants'. Validates input with ProjectIdSchema, fetches descendants using apiClient, formats and returns JSON response.
    handler: async (args) => { const { project_id, limit = 20, offset = 0 } = ProjectIdSchema.parse(args); const result = await apiClient.getProjectDescendants(project_id, limit, offset); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Successfully retrieved ${result.items?.length || 0} descendants for project ${project_id}` }, null, 2) }] };
  • Input schema defining parameters for get_project_descendants tool: project_id (required), optional limit and offset.
    inputSchema: { type: "object", properties: { project_id: { type: "string", description: "WebSim project ID" }, limit: { type: "number", description: "Number of descendants to return (default: 20)", default: 20 }, offset: { type: "number", description: "Number of descendants to skip (default: 0)", default: 0 } }, required: ["project_id"]
  • server.js:436-472 (registration)
    Full tool registration in the tools array, including name, description, inputSchema, and handler reference for get_project_descendants.
    { name: "get_project_descendants", description: "Get projects that are descendants of a WebSim project", inputSchema: { type: "object", properties: { project_id: { type: "string", description: "WebSim project ID" }, limit: { type: "number", description: "Number of descendants to return (default: 20)", default: 20 }, offset: { type: "number", description: "Number of descendants to skip (default: 0)", default: 0 } }, required: ["project_id"] }, handler: async (args) => { const { project_id, limit = 20, offset = 0 } = ProjectIdSchema.parse(args); const result = await apiClient.getProjectDescendants(project_id, limit, offset); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Successfully retrieved ${result.items?.length || 0} descendants for project ${project_id}` }, null, 2) }] }; }
  • Core API helper method in WebSimAPIClient that constructs and executes the HTTP request to fetch project descendants with pagination.
    async getProjectDescendants(projectId, limit = 20, offset = 0) { const params = new URLSearchParams({ limit: limit.toString(), offset: offset.toString() }); return this.makeRequest(`/api/v1/projects/${projectId}/descendants?${params}`); }
  • Shared Zod validation schema used by get_project_descendants handler (and others) to parse and validate the project_id parameter.
    const ProjectIdSchema = z.object({ project_id: z.string().describe('WebSim project ID') });

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