Skip to main content
Glama
n3m1

Solematica

by n3m1

cerca_articoli

Search Solematica's Italian solar blog by category or keyword to retrieve article titles, dates, categories and descriptions. No API key required.

Instructions

Cerca articoli nel blog di Solematica per categoria o keyword. Restituisce titolo, slug, categoria, data e meta description. Non richiede API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoriaNoFiltro per categoria (es. 'fotovoltaico', 'incentivi', 'risparmio')
limitNoNumero massimo di risultati (default 10, max 50)

Implementation Reference

  • The handler implementation for 'cerca_articoli' tool. Builds URL query parameters from arguments (categoria, limit), calls the /blog API endpoint, maps the response to a simplified article format with titolo, slug, categoria, data, descrizione, and url fields, and returns formatted JSON.
    case "cerca_articoli": {
      const params = new URLSearchParams();
      if (args.categoria) params.set("categoria", args.categoria);
      params.set("limit", String(Math.min(args.limit || 10, 50)));
      const data = await apiFetch(`/blog?${params.toString()}`);
      const articles = (data.articles || []).map((a) => ({
        titolo: a.titolo,
        slug: a.slug,
        categoria: a.categoria,
        data: a.pubblicato_at?.slice(0, 10),
        descrizione: a.meta_description,
        url: `https://www.solematica.it/blog/${a.slug}`,
      }));
      return JSON.stringify({ totale: data.total, articoli: articles }, null, 2);
    }
  • The input schema definition for 'cerca_articoli' tool. Defines the tool's metadata including name, description (search blog articles by category or keyword), and inputSchema with optional 'categoria' (string filter) and 'limit' (number, default 10, max 50) parameters.
    {
      name: "cerca_articoli",
      description:
        "Cerca articoli nel blog di Solematica per categoria o keyword. Restituisce titolo, slug, categoria, data e meta description. Non richiede API key.",
      inputSchema: {
        type: "object",
        properties: {
          categoria: { type: "string", description: "Filtro per categoria (es. 'fotovoltaico', 'incentivi', 'risparmio')" },
          limit: { type: "number", description: "Numero massimo di risultati (default 10, max 50)" },
        },
      },
    },
  • index.js:177-179 (registration)
    Registration of all tools with the MCP server via ListToolsRequestSchema handler. Returns the TOOLS array containing all tool definitions including 'cerca_articoli'.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS,
    }));
  • Helper function 'apiFetch' used by the cerca_articoli handler to make authenticated HTTP requests to the Solematica API. Handles authorization headers, JSON parsing, and error handling.
    async function apiFetch(path, options = {}) {
      const headers = { "Content-Type": "application/json" };
      if (API_KEY) headers["Authorization"] = `Bearer ${API_KEY}`;
      const res = await fetch(`${API_BASE}${path}`, { ...options, headers });
      if (!res.ok) {
        const err = await res.text().catch(() => "");
        throw new Error(`API ${res.status}: ${err.slice(0, 200)}`);
      }
      return res.json();
    }
Behavior4/5

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

Discloses return fields (title, slug, category, date, meta description) and authentication requirements (no API key) since no annotations exist.

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

Conciseness5/5

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

Three efficient sentences: action, return values, auth requirements. No fluff.

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

Completeness4/5

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

Compensates well for missing output schema by enumerating return fields; adequate for simple 2-parameter tool.

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

Parameters2/5

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

Description mentions 'keyword' filtering but schema only provides 'categoria' parameter, creating potential confusion about capabilities.

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?

Clearly states it searches Solematica blog articles and distinguishes from utility-oriented siblings (provider comparison, solar estimates), though mentions 'keyword' search not reflected in schema.

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?

No guidance on when to use versus siblings or content retrieval alternatives.

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/n3m1/solematica-mcp'

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