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 });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Lấy thông tin' - Get information), which is helpful, but doesn't cover other important aspects like authentication requirements, rate limits, error conditions, or what 'chi tiết' (detailed) entails in terms of returned data structure or fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately front-loaded with the core action and resource, though it could be slightly more structured by explicitly mentioning it retrieves data for a single site.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that presumably returns detailed site information. It doesn't explain what 'chi tiết' includes (e.g., site metadata, configuration, statistics), nor does it address behavioral aspects like error handling or data format, leaving significant gaps for an AI agent to understand the tool fully.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'siteId' clearly documented in the schema as 'ID của site cần lấy thông tin' (ID of the site to get information). The description doesn't add any meaningful parameter semantics beyond what the schema already provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Lấy thông tin chi tiết' - Get detailed information) and the resource ('một site' - a site), making the purpose immediately understandable. It doesn't specifically differentiate from sibling tools like 'matomo_get_sites' (which likely lists multiple sites), but the singular focus on one site is implied.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'matomo_get_sites' (for listing sites) or 'matomo_get_visits_summary' (for site analytics), nor does it specify prerequisites or contextual cues for selecting this specific retrieval tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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