Skip to main content
Glama
ewilderj

Fountain Pen Ink MCP Server

analyze_color

Identify fountain pen inks matching a specific color by analyzing hex codes and returning relevant ink knowledge with similarity results.

Instructions

Analyze a color and provide ink knowledge context

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorYesHex color code (e.g., "#FF5733")
max_resultsNoMaximum number of closest inks to return (default: 5)

Implementation Reference

  • The main handler function that implements the analyze_color tool logic: parses hex color to RGB, finds closest matching inks, determines color family and description using utilities, and returns a structured JSON analysis response.
    private analyzeColor(colorHex: string, maxResults: number = 5): MCPTextResponse {
      try {
        const rgb = hexToRgb(colorHex);
        const closestInks = findClosestInks(rgb, this.inkColors, maxResults);
    
        const results: SearchResult[] = closestInks.map((ink) => {
          const metadata = this.getInkMetadata(ink.ink_id);
          return createSearchResult(ink, metadata, ink.distance);
        });
    
        const analysis: ColorAnalysis = {
          hex: colorHex,
          rgb,
          closest_inks: results,
          color_family: getColorFamily(rgb), // No conversion needed
          description: getColorDescription(rgb), // No conversion needed
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(analysis, null, 2),
            },
          ],
        } satisfies MCPTextResponse;
      } catch {
        throw new Error(`Invalid color format: ${colorHex}. Please use hex format like #FF5733`);
      }
    }
  • src/index.ts:211-229 (registration)
    Registration of the analyze_color tool in the ListTools handler, including name, description, and input schema definition.
    {
      name: 'analyze_color',
      description: 'Analyze a color and provide ink knowledge context',
      inputSchema: {
        type: 'object',
        properties: {
          color: {
            type: 'string',
            description: 'Hex color code (e.g., "#FF5733")',
          },
          max_results: {
            type: 'number',
            description: 'Maximum number of closest inks to return (default: 5)',
            default: 5,
          },
        },
        required: ['color'],
      },
    },
  • src/index.ts:292-293 (registration)
    Dispatch/registration of the analyze_color tool in the CallToolRequest switch statement, mapping arguments to the handler method.
    case 'analyze_color':
      return this.analyzeColor(args.color as string, (args.max_results as number) || 5);
  • Input schema definition for the analyze_color tool, specifying parameters for color (required hex string) and optional max_results.
    inputSchema: {
      type: 'object',
      properties: {
        color: {
          type: 'string',
          description: 'Hex color code (e.g., "#FF5733")',
        },
        max_results: {
          type: 'number',
          description: 'Maximum number of closest inks to return (default: 5)',
          default: 5,
        },
      },
      required: ['color'],
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'provide ink knowledge context', but does not explain what this includes (e.g., types of information, format, limitations like rate limits or authentication needs). For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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

Conciseness4/5

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

The description is a single, efficient sentence that directly states the tool's function. It is appropriately sized and front-loaded with the core purpose, though it could be more structured with additional details. No wasted words, but brevity limits completeness.

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 tool has no annotations and no output schema, the description is incomplete. It lacks details on what 'ink knowledge context' means, the format of results, or how it differs from sibling tools. For a tool with 2 parameters and no structured output information, this leaves the agent with insufficient context to use it effectively.

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 schema description coverage is 100%, so the input schema fully documents the parameters 'color' and 'max_results'. The description does not add any meaning beyond the schema, such as explaining how 'ink knowledge context' relates to these parameters. Baseline is 3 as the schema handles the heavy lifting.

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 states the tool 'analyze a color and provide ink knowledge context', which gives a vague purpose. It specifies the verb 'analyze' and resource 'color', but lacks specificity on what 'ink knowledge context' entails or how it differs from sibling tools like 'search_inks_by_color'. This makes it adequate but unclear in scope.

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 is provided on when to use this tool versus alternatives such as 'search_inks_by_color' or 'get_ink_details'. The description implies usage for color analysis with ink context but does not specify scenarios, exclusions, or comparisons to sibling tools, leaving the agent without clear 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

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/ewilderj/inks-mcp'

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