Skip to main content
Glama
lorecraft-io

Refero MCP

Official
by lorecraft-io

refero_similar

Finds similar design styles from Refero's catalog using a style identifier from prior search results. Enables follow-up exploration of related styles.

Instructions

Refero's own "similar styles" recommendation list for a given style. Useful for follow-up exploration once you've found a candidate via refero_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
identifierYesuuid, hostname/URL, or site name.
limitNoHow many similar styles to return (default 10, max 20).

Implementation Reference

  • Main handler for refero_similar: resolves an identifier via resolveStyle, fetches full detail via getById, extracts the .similar array, maps results through toShorthand, and returns a SimilarResult.
    export async function handleSimilar(args: SimilarArgs): Promise<SimilarResult> {
      const identifier = asIdentifier(args.identifier);
      const limit = asLimit(args.limit);
    
      const catalog = await ensureCatalog();
      const match = resolveStyle(identifier, catalog);
      if (!match) {
        throw new IdentifierNotFoundError(
          `No style matched identifier ${JSON.stringify(identifier)} for refero_similar. ` +
            `Try refero_search first to find a valid id or site name.`,
        );
      }
    
      // Always fetch fresh detail — the .similar bucket is computed server-side
      // and isn't stored alongside the cached FullStyle. Refresh is cheap (one
      // request, fully cached afterwards via ensureStyle if needed).
      const detail = await getById(match.id);
      const similar = (detail.similar ?? []).slice(0, limit);
    
      return {
        identifier,
        styleId: match.id,
        count: similar.length,
        results: similar.map((s) => toShorthand(s)),
      };
    }
  • Input (SimilarArgs) and output (SimilarResult) type definitions for the refero_similar tool.
    export interface SimilarArgs {
      identifier?: unknown;
      limit?: unknown;
    }
    
    export interface SimilarResult {
      identifier: string;
      styleId: string;
      count: number;
      results: StyleShorthand[];
    }
  • src/server.ts:95-114 (registration)
    Registration of refero_similar tool in the TOOLS array with name, description, inputSchema (identifier + limit).
    {
      name: "refero_similar",
      description:
        "Refero's own \"similar styles\" recommendation list for a given style. Useful for follow-up exploration once you've found a candidate via refero_search.",
      inputSchema: {
        type: "object",
        properties: {
          identifier: {
            type: "string",
            description: "uuid, hostname/URL, or site name.",
          },
          limit: {
            type: "number",
            description: "How many similar styles to return (default 10, max 20).",
          },
        },
        required: ["identifier"],
        additionalProperties: false,
      },
    },
  • src/server.ts:168-169 (registration)
    Dispatch routing: maps 'refero_similar' tool name to handleSimilar handler.
    case "refero_similar":
      return handleSimilar(a);
  • toShorthand helper used to project style items in the refero_similar results.
    export function toShorthand(
      item: StyleListItem,
      opts: { score?: number; tags?: string[] } = {},
    ): StyleShorthand {
      return {
        id: item.id,
        siteName: item.siteName,
        url: item.url,
        northStar: item.northStar,
        theme: item.colorScheme,
        tags: opts.tags ?? [],
        thumbnailUrl: item.thumbnailUrl,
        ...(opts.score !== undefined ? { score: opts.score } : {}),
      };
    }
Behavior2/5

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

No annotations provided; description does not disclose read-only nature, required permissions, or any side effects. Minimal behavioral info beyond purpose.

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?

Two concise sentences with no fluff. First sentence states purpose, second gives usage context.

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?

No output schema; description does not hint at return format or pagination. However, tool is simple with good sibling context, so adequate but not complete.

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?

Schema covers both parameters with descriptions; description adds no extra meaning. Baseline 3 due to 100% schema coverage.

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?

Clearly states 'recommendation list for a given style' and distinguishes from siblings by referencing refero_search as a precursor.

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

Usage Guidelines4/5

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

Explicitly says 'Useful for follow-up exploration once you've found a candidate via refero_search', which tells when to use it. Does not explicitly exclude alternatives, but context is sufficient.

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/lorecraft-io/refero-design-mcp'

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