Skip to main content
Glama

get_compatibility

Analyze zodiac sign compatibility by calculating pairing scores and relationship insights for two specified star signs.

Instructions

获取两个星座的配对指数和关系分析

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zodiac1Yes第一个星座名称(中文或英文)
zodiac2Yes第二个星座名称(中文或英文)

Implementation Reference

  • Core handler function that computes the compatibility score, level, and description between two zodiac signs based on predefined best/good/poor matches in compatibilityData.
    function getCompatibilityScore(zodiac1, zodiac2) {
      const compat1 = compatibilityData[zodiac1];
      const compat2 = compatibilityData[zodiac2];
      
      if (!compat1 || !compat2) return { score: 50, level: '一般', description: '配对信息不足' };
      
      if (compat1.best.includes(zodiac2) || compat2.best.includes(zodiac1)) {
        return { score: 95, level: '绝配', description: '天生一对,非常般配' };
      }
      if (compat1.good.includes(zodiac2) || compat2.good.includes(zodiac1)) {
        return { score: 80, level: '良好', description: '相处融洽,关系稳定' };
      }
      if (compat1.poor.includes(zodiac2) || compat2.poor.includes(zodiac1)) {
        return { score: 30, level: '挑战', description: '需要更多理解和包容' };
      }
      
      return { score: 60, level: '一般', description: '普通配对,需要努力经营' };
    }
  • Input schema for the get_compatibility tool, defining zodiac1 and zodiac2 as required string parameters with enum validation based on zodiacData.
    inputSchema: {
      type: 'object',
      properties: {
        zodiac1: {
          type: 'string',
          description: '第一个星座名称(中文或英文)',
          enum: Object.keys(zodiacData).concat(Object.values(zodiacData).map(z => z.name))
        },
        zodiac2: {
          type: 'string',
          description: '第二个星座名称(中文或英文)',
          enum: Object.keys(zodiacData).concat(Object.values(zodiacData).map(z => z.name))
        }
      },
      required: ['zodiac1', 'zodiac2']
    }
  • index.js:471-490 (registration)
    Registration of the get_compatibility tool in the tools array, including name, description, and input schema, used by ListToolsRequestHandler.
    {
      name: 'get_compatibility',
      description: '获取两个星座的配对指数和关系分析',
      inputSchema: {
        type: 'object',
        properties: {
          zodiac1: {
            type: 'string',
            description: '第一个星座名称(中文或英文)',
            enum: Object.keys(zodiacData).concat(Object.values(zodiacData).map(z => z.name))
          },
          zodiac2: {
            type: 'string',
            description: '第二个星座名称(中文或英文)',
            enum: Object.keys(zodiacData).concat(Object.values(zodiacData).map(z => z.name))
          }
        },
        required: ['zodiac1', 'zodiac2']
      }
    },
  • Predefined compatibility data structure used by getCompatibilityScore to determine best, good, and poor matches between zodiac signs.
    const compatibilityData = {
      aries: { best: ['leo', 'sagittarius'], good: ['gemini', 'aquarius'], poor: ['cancer', 'capricorn'] },
      taurus: { best: ['virgo', 'capricorn'], good: ['cancer', 'pisces'], poor: ['leo', 'aquarius'] },
      gemini: { best: ['libra', 'aquarius'], good: ['aries', 'leo'], poor: ['virgo', 'pisces'] },
      cancer: { best: ['scorpio', 'pisces'], good: ['taurus', 'virgo'], poor: ['aries', 'libra'] },
      leo: { best: ['aries', 'sagittarius'], good: ['gemini', 'libra'], poor: ['taurus', 'scorpio'] },
      virgo: { best: ['taurus', 'capricorn'], good: ['cancer', 'scorpio'], poor: ['gemini', 'sagittarius'] },
      libra: { best: ['gemini', 'aquarius'], good: ['leo', 'sagittarius'], poor: ['cancer', 'capricorn'] },
      scorpio: { best: ['cancer', 'pisces'], good: ['virgo', 'capricorn'], poor: ['leo', 'aquarius'] },
      sagittarius: { best: ['aries', 'leo'], good: ['libra', 'aquarius'], poor: ['virgo', 'pisces'] },
      capricorn: { best: ['taurus', 'virgo'], good: ['scorpio', 'pisces'], poor: ['aries', 'libra'] },
      aquarius: { best: ['gemini', 'libra'], good: ['aries', 'sagittarius'], poor: ['taurus', 'scorpio'] },
      pisces: { best: ['cancer', 'scorpio'], good: ['taurus', 'capricorn'], poor: ['gemini', 'sagittarius'] }
    };
  • Dispatch handler in the main CallToolRequestSchema switch that processes get_compatibility requests, validates inputs, calls getCompatibilityScore, and formats the MCP response.
          case 'get_compatibility': {
            const zodiac1Key = getZodiacKey(args.zodiac1);
            const zodiac2Key = getZodiacKey(args.zodiac2);
            
            if (!zodiac1Key || !zodiac2Key) {
              throw new Error('星座名称无效');
            }
            
            const zodiac1 = zodiacData[zodiac1Key];
            const zodiac2 = zodiacData[zodiac2Key];
            const compatibility = getCompatibilityScore(zodiac1Key, zodiac2Key);
            
            result = {
              content: [
                {
                  type: 'text',
                  text: `# ${zodiac1.symbol} ${zodiac1.name} & ${zodiac2.symbol} ${zodiac2.name} 配对分析
    
    **配对指数:** ${compatibility.score}/100
    **配对等级:** ${compatibility.level}
    
    **关系分析:**
    ${compatibility.description}
    
    **元素关系:**
    ${zodiac1.element} + ${zodiac2.element} = ${getElementCompatibility(zodiac1.element, zodiac2.element)}
    
    **建议:**
    - 多了解对方的性格特点
    - 保持开放和包容的心态
    - 在关系中寻找平衡点
    - 珍惜彼此的独特之处`
                }
              ]
            };
            break;
          }
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. It states the tool 'gets' data, implying a read-only operation, but doesn't mention potential limitations like rate limits, authentication needs, or what the output format looks like. For a tool with zero annotation coverage, this is a significant gap in transparency.

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, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the purpose but lacks details on behavioral traits, usage context, and output format. With no output schema, the agent must infer return values from the description alone, which is insufficient for full completeness.

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%, with both parameters clearly documented in the input schema (including descriptions and enums). The description adds no additional meaning beyond what the schema provides, such as explaining parameter interactions or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

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 the specific action ('获取' meaning 'get') and the resource ('配对指数和关系分析' meaning 'compatibility index and relationship analysis'), distinguishing it from sibling tools that focus on daily horoscopes, zodiac information, or rising signs. It precisely communicates what the tool does without being vague or tautological.

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 like get_zodiac_info or get_daily_horoscope. It lacks explicit context, prerequisites, or exclusions, leaving the agent to infer usage based on the purpose alone.

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/jlankellii/star-mcp'

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