Skip to main content
Glama

list_community_builds

Browse community PC builds from meupc.net with title, price, and components. Sort builds by newest, best, or best recent.

Instructions

Builds de PC compartilhadas pela comunidade do meupc.net, com título, preço e componentes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoOrdenação das builds ('melhores-recentes', 'melhores', 'novas')melhores-recentes
pageNoNúmero da página

Implementation Reference

  • The actual handler function that scrapes community builds from meupc.net. It fetches the /builds-comunidade page, parses each card for title, author, price, likes, and components, and returns JSON.
    export async function listCommunityBuilds(params: ListCommunityBuildsParams): Promise<string> {
      const { sort, page } = params;
    
      const url = `/builds-comunidade?ordem=${sort}&page=${page}`;
      const root = await fetchPage(url);
    
      const results: BuildSummary[] = [];
    
      root.querySelectorAll("article.card.is-fullheight").forEach(card => {
        const titleEl = card.querySelector(".card-content h3.title a");
        const title = titleEl?.text.trim() ?? "";
        if (!title) return;
    
        const buildUrl = titleEl?.getAttribute("href") ?? "";
    
        // Autor
        const author = card.querySelector(".card-content p.by a.has-text-weight-semibold")?.text.trim() || null;
    
        // Preço total
        const priceText = card.querySelector(".card-content a.preco")?.text.trim() ?? "";
        const totalPrice = parsePrice(priceText);
    
        // Curtidas
        const likesAttr = card.querySelector("footer a.js-like-button")?.getAttribute("data-total-likes");
        const likesText = card.querySelector("footer span.js-like-total")?.text.trim() ?? "";
        const likes = likesAttr ? parseInt(likesAttr, 10) : (likesText ? parseInt(likesText, 10) : null);
    
        // Componentes principais (lista no card)
        const components: string[] = [];
        card.querySelectorAll(".card-content div.content.is-small ul li").forEach(li => {
          const comp = li.text.trim();
          if (comp) components.push(comp);
        });
    
        results.push({
          title,
          author,
          totalPrice,
          likes: isNaN(likes as number) ? null : likes,
          url: absoluteUrl(buildUrl),
          components,
        });
      });
    
      return JSON.stringify(results, null, 2);
    }
  • Zod schema defining input parameters: sort (enum of 'melhores-recentes', 'melhores', 'novas') and page (positive int, default 1).
    export const listCommunityBuildsSchema = z.object({
      sort: z.enum(SORT_OPTIONS).default("melhores-recentes").describe("Ordenação das builds ('melhores-recentes', 'melhores', 'novas')"),
      page: z.number().int().positive().default(1).describe("Número da página"),
    });
  • src/index.ts:52-59 (registration)
    Registration of the tool with the MCP server under the name 'list_community_builds', with schema and handler.
    server.tool(
      "list_community_builds",
      "Builds de PC compartilhadas pela comunidade do meupc.net, com título, preço e componentes",
      listCommunityBuildsSchema.shape,
      async (params) => ({
        content: [{ type: "text", text: await listCommunityBuilds(params) }],
      })
    );
  • Helper function absoluteUrl used to convert relative build URLs to absolute URLs.
    export function absoluteUrl(path: string | undefined | null): string {
      if (!path) return "";
      if (path.startsWith("http")) return path;
      return `${BASE_URL}${path.startsWith("/") ? "" : "/"}${path}`;
    }
    
    export function parsePrice(text: string | undefined | null): number | null {
      if (!text) return null;
      const cleaned = text.replace(/[R$\s.]/g, "").replace(",", ".");
      const num = parseFloat(cleaned);
      return isNaN(num) ? null : num;
    }
  • Helper function parsePrice used to parse price strings into numbers.
    export function parsePrice(text: string | undefined | null): number | null {
      if (!text) return null;
      const cleaned = text.replace(/[R$\s.]/g, "").replace(",", ".");
      const num = parseFloat(cleaned);
      return isNaN(num) ? null : num;
    }
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as pagination behavior, rate limits, or what happens if no builds are found. The description only lists what is included in the builds, which is minimal.

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?

The description is a single sentence that conveys the essential purpose and content of the builds, with no unnecessary words. It is front-loaded and to the point.

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

Completeness3/5

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

While the tool has only two parameters and no output schema, the description does not explain pagination or sorting behavior. It is adequate for a simple listing but could mention what each build entry contains beyond title, price, and components.

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 input schema has 100% coverage with descriptions for both parameters (sort and page). The description does not add any additional meaning beyond what the schema provides, so a baseline score of 3 is appropriate.

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

Purpose5/5

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

The description clearly states that the tool lists PC builds shared by the community, including title, price, and components. This distinguishes it from sibling tools like get_build_details (likely for a single build) and component-related tools.

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

Usage Guidelines3/5

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

No explicit when-to-use or when-not-to-use guidance is provided. Usage context is implied by the name and description, but there are no alternatives mentioned or exclusion criteria.

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/leosebben/mcp-meupc'

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