Skip to main content
Glama
Aias

Barnsworthburning MCP

by Aias

search

Look up content on barnsworthburning.net using a specific query. This tool enables direct searches through compatible AI clients for quick access to relevant information.

Instructions

Search barnsworthburning.net for the given query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query to look for on barnsworthburning.net

Implementation Reference

  • The async handler function for the 'search' tool. It performs the search request, handles errors and empty results, formats the results into markdown using formatResultItem, and returns structured text content.
    async ({ query }) => {
      const searchData = await makeSearchRequest(query);
    
      if (!searchData) {
        return {
          content: [
            {
              type: "text",
              text: "Failed to retrieve search results",
            },
          ],
        };
      }
    
      const results = searchData || [];
    
      if (results.length === 0) {
        return {
          content: [
            {
              type: "text",
              text: `No results found for "${query}"`,
            },
          ],
        };
      }
    
      // Format the results as text
      const formattedResults = results
        .slice(0, MAX_RESULTS)
        .map(formatResultItem)
        .join("\n---\n\n");
    
      return {
        content: [
          {
            type: "text",
            text: `Search results for "${query}":\n\n${formattedResults}`,
          },
        ],
      };
    }
  • Zod schema defining the input parameter 'query' for the search tool, requiring a string of at least 2 characters.
    export const SearchQuerySchema = z
      .string()
      .min(2, "Search query must be at least 2 characters")
      .describe("The search query to look for on barnsworthburning.net");
  • src/index.ts:147-152 (registration)
    Registration of the 'search' tool on the MCP server, specifying the tool name, description, and input schema.
    server.tool(
      "search",
      "Search barnsworthburning.net for the given query",
      {
        query: SearchQuerySchema,
      },
  • Helper function that makes the HTTP request to the barnsworthburning.net search API, parses the JSON response using SearchResultsSchema, and returns the results or null on error.
    async function makeSearchRequest(
      query: string
    ): Promise<SearchResultItem[] | null> {
      const headers = {
        "User-Agent": USER_AGENT,
        Accept: "application/json",
      };
    
      try {
        const url = `${SEARCH_API_BASE}?q=${encodeURIComponent(query)}`;
        const response = await fetch(url, { headers });
    
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
    
        const json = await response.json();
        const parsed = SearchResultsSchema.parse(json);
        return parsed.results;
      } catch (error) {
        console.error("Error making search request:", error);
        return null;
      }
    }
  • Helper function that formats a single SearchResultItem into a rich markdown string including title, metadata, extract, notes, and relationships.
    function formatResultItem(item: SearchResultItem) {
      const {
        title,
        id,
        creators,
        source,
        extract,
        format,
        spaces,
        connections,
        parent,
        children,
        notes,
        extractedOn,
        lastUpdated,
      } = item;
    
      let content = `## ${title ?? id}\n\n`;
    
      if (format) {
        content += `**Format:** ${format}\n`;
      }
      if (creators) {
        content += `**By:** ${creators.map((c) => c.name).join(", ")}\n`;
      }
      if (source) {
        content += `**Source:** ${source}\n`;
      }
      content += `**Created:** ${extractedOn.toLocaleDateString()}\n`;
      content += `**Updated:** ${lastUpdated.toLocaleDateString()}\n`;
    
      if (extract) {
        content += `\n${extract}\n`;
      }
      if (notes) {
        content += `\n*Curator's Note:*\n\n${notes}\n`;
      }
      content += `\n`;
      if (parent) {
        content += `**Parent Record:** ${parent.name}\n`;
      }
      if (children && children.length > 0) {
        content += `**Child Records:**\n${children
          .map((c) => `- ${c.name}`)
          .join("\n")}\n\n`;
      }
      if (connections && connections.length > 0) {
        content += `**See also:**\n${connections
          .map((c) => `- ${c.name}`)
          .join("\n")}\n\n`;
      }
      if (spaces && spaces.length > 0) {
        content += `**Tagged:** ${spaces.map((s) => `#${s.name}`).join(", ")}\n`;
      }
    
      return content;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Search' implies a read-only operation, the description fails to specify critical details like rate limits, authentication needs, result format, or pagination behavior, which are essential for effective tool invocation.

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, direct sentence that efficiently conveys the core functionality without any unnecessary words. It is front-loaded and appropriately sized for a simple tool, making it easy for an agent to parse and understand quickly.

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 insufficiently complete. It does not address behavioral aspects like result handling or error conditions, nor does it compensate for the missing structured data, leaving gaps in understanding how to effectively use the tool.

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% description coverage, with the 'query' parameter well-documented in the schema itself. The description adds minimal value by mentioning the query but does not provide additional semantic context beyond what the schema already states, aligning with the baseline score for high schema coverage.

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 tool's purpose with a specific verb ('Search') and resource ('barnsworthburning.net'), making it immediately understandable. However, since there are no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, which prevents a perfect score of 5.

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 or any contextual prerequisites. It simply states what the tool does without indicating appropriate scenarios or limitations, leaving the agent with minimal usage direction.

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

Related 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/Aias/barnsworthburning-mcp'

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