Skip to main content
Glama

get_project_assets

Retrieve assets for a WebSim project version to access project resources and content.

Instructions

Get assets for a specific project version

Input Schema

NameRequiredDescriptionDefault
project_idYesWebSim project ID
versionNoProject version (default: latest)latest

Input Schema (JSON Schema)

{ "properties": { "project_id": { "description": "WebSim project ID", "type": "string" }, "version": { "default": "latest", "description": "Project version (default: latest)", "type": "string" } }, "required": [ "project_id" ], "type": "object" }

Implementation Reference

  • The MCP tool handler for 'get_project_assets' that validates input with ProjectRevisionSchema, fetches assets via apiClient, and formats the response as JSON text content.
    handler: async (args) => { const { project_id, version = 'latest' } = ProjectRevisionSchema.parse(args); const result = await apiClient.getProjectAssets(project_id, version); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Successfully retrieved assets for project ${project_id} (version: ${version})` }, null, 2) }] }; }
  • Input schema defining the parameters for the 'get_project_assets' tool: project_id (required string) and version (optional string, default 'latest').
    inputSchema: { type: "object", properties: { project_id: { type: "string", description: "WebSim project ID" }, version: { type: "string", description: "Project version (default: latest)", default: "latest" } }, required: ["project_id"] },
  • server.js:966-998 (registration)
    The tool registration object added to the 'tools' array, specifying name, description, inputSchema, and handler for 'get_project_assets'.
    { name: "get_project_assets", description: "Get assets for a specific project version", inputSchema: { type: "object", properties: { project_id: { type: "string", description: "WebSim project ID" }, version: { type: "string", description: "Project version (default: latest)", default: "latest" } }, required: ["project_id"] }, handler: async (args) => { const { project_id, version = 'latest' } = ProjectRevisionSchema.parse(args); const result = await apiClient.getProjectAssets(project_id, version); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Successfully retrieved assets for project ${project_id} (version: ${version})` }, null, 2) }] }; } },
  • Helper method in WebSimAPIClient class that makes the HTTP request to retrieve assets for a specific project revision/version.
    async getProjectAssets(projectId, version = 'latest') { const params = new URLSearchParams({ version }); return this.makeRequest(`/api/v1/projects/${projectId}/revisions/${version}/assets?${params}`); }
  • Zod validation schema used by the tool handler to parse and validate the input arguments (project_id required, version optional).
    const ProjectRevisionSchema = z.object({ project_id: z.string().describe('WebSim project ID'), version: z.string().optional().describe('Project version (default: latest)') });

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