Skip to main content
Glama
dmarsters

Constellation Composition MCP Server

by dmarsters

Extract 5D Parameter Coordinates for a Constellation or State

get_constellation_coordinates
Read-onlyIdempotent

Retrieve normalized 5D coordinates for constellation states to enable trajectory computation, rhythmic composition, attractor visualization, and multi-domain AI image generation.

Instructions

Extract normalized 5D parameter coordinates for a canonical state or constellation name.

Layer 1: Pure taxonomy lookup (0 tokens).

If a canonical state name is given (e.g. 'orion_grandeur'), returns its exact coordinates. If a constellation name is given (e.g. 'Orion'), returns the nearest canonical state's coordinates with distance metric.

Coordinates are suitable for:

  • Trajectory computation (Phase 1A)

  • Rhythmic composition input (Phase 2.6)

  • Attractor visualization (Phase 2.7)

  • Multi-domain composition (Tier 4D)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
response_formatNoOutput format for responses.json

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool 'get_constellation_coordinates' retrieves 5D parameter coordinates for a constellation or canonical state. It handles both direct canonical state lookups and constellation lookups (which are then mapped to the nearest canonical state or inferred).
    async def get_constellation_coordinates(
        name: str,
        response_format: ResponseFormat = ResponseFormat.JSON
    ) -> str:
        """
        Extract normalized 5D parameter coordinates for a canonical state or
        constellation name.
    
        Layer 1: Pure taxonomy lookup (0 tokens).
    
        If a canonical state name is given (e.g. 'orion_grandeur'), returns its
        exact coordinates. If a constellation name is given (e.g. 'Orion'),
        returns the nearest canonical state's coordinates with distance metric.
    
        Coordinates are suitable for:
        - Trajectory computation (Phase 1A)
        - Rhythmic composition input (Phase 2.6)
        - Attractor visualization (Phase 2.7)
        - Multi-domain composition (Tier 4D)
        """
        # Direct canonical state lookup
        if name in CONSTELLATION_CANONICAL_STATES:
            state = CONSTELLATION_CANONICAL_STATES[name]
            coords = {p: state[p] for p in CONSTELLATION_PARAMETER_NAMES}
            result = {
                "state_name": name,
                "source_constellation": state.get("source_constellation", ""),
                "description": state.get("description", ""),
                "coordinates": coords,
                "parameter_names": CONSTELLATION_PARAMETER_NAMES,
                "match_type": "exact_canonical"
            }
        else:
            # Try to match constellation name to nearest canonical state
            target_name = None
            for cname in CONSTELLATIONS:
                if name.lower() == cname.lower():
                    target_name = cname
                    break
                if name.lower() == CONSTELLATIONS[cname]['abbr'].lower():
                    target_name = cname
                    break
    
            if not target_name:
                available_states = ", ".join(sorted(CONSTELLATION_CANONICAL_STATES.keys()))
                available_const = ", ".join(sorted(CONSTELLATIONS.keys()))
                return json.dumps({
                    "error": f"'{name}' not found",
                    "available_canonical_states": available_states,
                    "available_constellations": available_const
                }, indent=2)
    
            # Find canonical state sourced from this constellation
            exact_match = None
            for sname, sdata in CONSTELLATION_CANONICAL_STATES.items():
                if sdata.get("source_constellation", "").lower() == target_name.lower():
                    exact_match = sname
                    break
    
            if exact_match:
                state = CONSTELLATION_CANONICAL_STATES[exact_match]
                coords = {p: state[p] for p in CONSTELLATION_PARAMETER_NAMES}
                result = {
                    "state_name": exact_match,
                    "source_constellation": target_name,
                    "description": state.get("description", ""),
                    "coordinates": coords,
                    "parameter_names": CONSTELLATION_PARAMETER_NAMES,
                    "match_type": "constellation_to_canonical"
                }
            else:
                # Infer coordinates from constellation metadata
                meta = CONSTELLATIONS[target_name]
                coords = _infer_coordinates_from_metadata(meta)
                result = {
                    "state_name": None,
                    "source_constellation": target_name,
                    "description": f"Inferred from {target_name} metadata (no canonical state)",
                    "coordinates": coords,
                    "parameter_names": CONSTELLATION_PARAMETER_NAMES,
                    "match_type": "inferred"
                }
    
        if response_format == ResponseFormat.JSON:
            return json.dumps(result, indent=2)
        else:
            md = f"# Coordinates: {result.get('state_name') or result['source_constellation']}\n\n"
            md += f"**Match type:** {result['match_type']}\n\n"
            md += f"**Description:** {result['description']}\n\n"
            for p in CONSTELLATION_PARAMETER_NAMES:
                val = result['coordinates'][p]
                bar = "█" * int(val * 20)
                md += f"- `{p}`: {val:.2f} {bar}\n"
            return md
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false. The description adds valuable context beyond this: it specifies that it's a 'Pure taxonomy lookup (0 tokens)' (implying no computational cost), explains the difference in behavior for state vs. constellation names, and lists concrete applications for the output. No contradiction with annotations exists.

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 efficiently structured: the first sentence states the core purpose, followed by a bullet-point-like breakdown of behavior and use cases. Every sentence adds value—no fluff or repetition. It's front-loaded with the main functionality and appropriately sized for the tool's complexity.

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

Completeness5/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, 1 required), rich annotations (covering safety and idempotency), and the presence of an output schema (which handles return values), the description is complete. It covers purpose, usage guidelines, parameter semantics, and behavioral context without needing to explain outputs or repeat annotation details.

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

Parameters4/5

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

Schema description coverage is 50% (only 'response_format' has a description). The description compensates by clarifying the semantics of the 'name' parameter: it explains that it accepts either a 'canonical state name' (e.g., 'orion_grandeur') or a 'constellation name' (e.g., 'Orion'), which is crucial information not in the schema. However, it doesn't detail the 'response_format' parameter beyond what the schema provides.

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 ('Extract normalized 5D parameter coordinates') and resource ('for a canonical state or constellation name'), distinguishing it from siblings like 'list_all_constellations' (which lists names) and 'compute_constellation_trajectory' (which uses coordinates). It specifies the exact output type and scope.

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

Usage Guidelines5/5

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

It provides explicit guidance on when to use this tool vs alternatives: 'If a canonical state name is given... returns its exact coordinates. If a constellation name is given... returns the nearest canonical state's coordinates with distance metric.' It also lists specific use cases (e.g., trajectory computation, rhythmic composition) and distinguishes from siblings like 'search_constellations' (which likely returns names rather than coordinates).

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/dmarsters/constellation-composition-mcp'

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