Skip to main content
Glama
mmntm

Weblate MCP Server

by mmntm

listProjects

Retrieve all translation projects available in Weblate for management and overview.

Instructions

List all available Weblate projects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'listProjects' tool. It fetches projects using WeblateApiService, formats them into a markdown list, and returns them in the expected MCP content format. Handles errors gracefully.
    async listProjects() { try { const projects = await this.weblateApiService.listProjects(); return { content: [ { type: 'text', text: `Found ${projects.length} projects:\n\n${projects .map((p) => `- **${p.name}** (${p.slug})\n URL: ${p.web_url}`) .join('\n\n')}`, }, ], }; } catch (error) { this.logger.error('Failed to list projects', error); return { content: [ { type: 'text', text: `Error listing projects: ${error.message}`, }, ], isError: true, }; } }
  • The @Tool decorator registers the 'listProjects' function as an MCP tool, providing the name, description, and input schema (empty object since no parameters).
    @Tool({ name: 'listProjects', description: 'List all available Weblate projects', parameters: z.object({}), })
  • Zod schema defining the input parameters for the tool (no parameters required).
    parameters: z.object({}),

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/mmntm/weblate-mcp'

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