Skip to main content
Glama
thichcode

Matomo MCP Server

by thichcode

matomo_get_site

Retrieve detailed information about a specific Matomo Analytics site using its site ID to access configuration, settings, and metadata.

Instructions

Lấy thông tin chi tiết của một site

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteIdYesID của site cần lấy thông tin

Implementation Reference

  • Core handler function that makes the API call to retrieve site information from Matomo using SitesManager.getSiteFromId
    async getSite(siteId: number): Promise<MatomoSite> { const response = await this.makeRequest('SitesManager.getSiteFromId', { idSite: siteId }); return response; }
  • MCP server wrapper handler for matomo_get_site tool, checks connection and formats response from service
    private async handleGetSite(args: { siteId: number }) { if (!this.matomoService) { throw new Error('Chưa kết nối đến Matomo. Vui lòng sử dụng matomo_connect trước.'); } const site = await this.matomoService.getSite(args.siteId); return { content: [ { type: 'text', text: `Thông tin site:\n${JSON.stringify(site, null, 2)}`, }, ], }; }
  • Input schema definition for the matomo_get_site tool, specifying siteId as required number
    name: 'matomo_get_site', description: 'Lấy thông tin chi tiết của một site', inputSchema: { type: 'object', properties: { siteId: { type: 'number', description: 'ID của site cần lấy thông tin', }, }, required: ['siteId'], }, },
  • src/index.ts:259-260 (registration)
    Registration of the tool handler in the CallToolRequest switch statement
    case 'matomo_get_site': return await this.handleGetSite(args as { siteId: number });

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/thichcode/matomo_mcp'

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