Skip to main content
Glama
luistorres789321

ia-cae-zurekin-mcp

get_page

Retrieve a specific page from the authenticated CAEZ Urekin web by providing URL and path. Get page content directly.

Instructions

Obtiene una p�gina concreta del sitio.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
pathNo

Implementation Reference

  • The main handler for the 'get_page' tool. Accepts optional 'url' or 'path', fetches the page HTML via fetchPage(), extracts readable content, and returns title, URL, path, content_text, content_markdown, and links.
    server.tool(
      'get_page',
      'Obtiene una p�gina concreta del sitio.',
      {
        url: z.string().optional(),
        path: z.string().optional()
      },
      async ({ url, path }) => {
        try {
          if (!url && !path) throw new Error('INVALID_URL');
          const target = url || path;
          const { html, finalUrl } = await fetchPage(target);
          const extracted = extractReadableContent(html, finalUrl);
    
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({
                  title: extracted.title,
                  url: finalUrl,
                  path: new URL(finalUrl).pathname,
                  content_text: extracted.contentText,
                  content_markdown: `# ${extracted.title}\n\n${extracted.contentText}`,
                  links: extracted.links
                }, null, 2)
              }
            ]
          };
        } catch (error) {
          return mcpError(error);
        }
      }
    );
  • Input schema for 'get_page': accepts optional 'url' (string) and 'path' (string) parameters.
    {
      url: z.string().optional(),
      path: z.string().optional()
    },
  • src/index.js:264-265 (registration)
    Registration of 'get_page' tool via server.tool(), with description 'Obtiene una página concreta del sitio.'.
    server.tool(
      'get_page',
  • Helper function fetchPage() that ensures authentication, makes a GET request, and returns the HTML and final URL.
    async function fetchPage(urlOrPath) {
      await ensureAuthenticated();
      const response = await request(urlOrPath, { method: 'GET' });
      if (!response.ok) {
        throw new Error(response.status === 404 ? 'PAGE_NOT_FOUND' : 'INTERNAL_ERROR');
      }
      const finalUrl = response.url || normalizeUrl(urlOrPath);
      const html = await response.text();
      return { html, finalUrl };
    }
  • Helper function extractReadableContent() that parses HTML with cheerio, extracts title, sections, links, and cleaned body text.
    function extractReadableContent(html, pageUrl) {
      const $ = cheerio.load(html);
      $('script, style, noscript').remove();
    
      const title = $('title').first().text().trim() || $('h1').first().text().trim() || pageUrl;
      const sections = [];
    
      $('h1, h2, h3').each((_, el) => {
        const heading = $(el).text().trim();
        const texts = [];
        let current = $(el).next();
    
        while (current.length && !['h1', 'h2', 'h3'].includes(current.get(0)?.tagName)) {
          const text = current.text().trim();
          if (text) texts.push(text);
          current = current.next();
        }
    
        if (heading || texts.length) {
          sections.push({ heading, text: texts.join('\n\n') });
        }
      });
    
      const links = [];
      $('a[href]').each((_, el) => {
        const href = $(el).attr('href');
        const label = $(el).text().trim();
        if (!href) return;
        try {
          const url = new URL(href, pageUrl).toString();
          if (url.startsWith(BASE_URL)) {
            links.push({ label: label || url, url });
          }
        } catch {
        }
      });
    
      const contentText = $('body')
        .text()
        .replace(/\s+\n/g, '\n')
        .replace(/\n\s+/g, '\n')
        .replace(/\n{3,}/g, '\n\n')
        .trim();
    
      return {
        title,
        contentText,
        sections,
        links: dedupeLinks(links)
      };
    }
Behavior2/5

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

No annotations provided, so the description must disclose behavioral traits. It only says 'Gets' without confirming read-only status, authentication needs, or rate limits. The description adds minimal transparency beyond the tool's name.

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

Conciseness2/5

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

The description is overly brief (one sentence), sacrificing necessary detail for brevity. It omits parameter explanations and usage context, making it under-specified rather than concise.

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

Completeness1/5

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

Given no output schema and no parameter descriptions, the tool's behavior is almost entirely undocumented. The agent lacks info on return values, error handling, or how input fields relate to page retrieval, resulting in very poor completeness.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not explain the meaning or expected format of parameters 'url' and 'path'. Without any parameter information, the agent cannot construct valid calls effectively.

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

Purpose3/5

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

The description 'Gets a specific page of the site' provides a verb and resource but is vague, not distinguishing it from siblings like extract_page_content or list_sections. A clearer purpose would specify what 'get' means (e.g., retrieve metadata, content, or both).

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 this tool over siblings. For instance, should users call get_page before extract_page_content? No alternatives or exclusions mentioned, leaving the agent without decision context.

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/luistorres789321/ia-cae-zurekin-mcp'

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