Skip to main content
Glama

nyx_list_services

List all downstream services callable through NyxID, including endpoints and configuration, for tool discovery before proxy requests.

Instructions

Enumerate the downstream services this agent can call through NyxID. Returns each service's slug, display name, base URL, auth method, configured rate limits, and (when an OpenAPI spec is available) its callable endpoints. Use this for tool discovery before issuing nyx_proxy_request — agent-key scope determines which services are visible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoOptional filter by service category. Omit to list all categories.
include_endpointsNoWhen true, include the parsed OpenAPI endpoint list per service. Adds latency on services with large specs.

Implementation Reference

  • Registration of the nyxid_list_services tool via api.registerTool, defining its name, description, and execute handler.
    api.registerTool?.({
      name: "nyxid_list_services",
      description: "List AI services configured in the current user's NyxID account. Returns service slugs for use with nyxid_proxy.",
      execute: async (_params, context) => {
        const config = normalizeConfig(context.config);
        const profile = await loadProfile(context, config);
        const updatedProfile = await ensureBaseToken(getFetch(context), config, profile);
        await saveProfile(context, updatedProfile);
        const response = await listServices(getFetch(context), config, updatedProfile);
        return {
          services: response.services.map((service) => ({
            id: service.id,
            slug: service.slug,
            name: service.name,
            connected: service.connected,
            requires_connection: service.requires_connection,
            proxy_url_slug: service.proxy_url_slug,
          })),
          total: response.total,
          page: response.page,
          per_page: response.per_page,
        };
      },
    });
  • Execute handler for nyxid_list_services: loads profile, ensures base token, calls listServices(), and maps the response to {services, total, page, per_page}.
    execute: async (_params, context) => {
      const config = normalizeConfig(context.config);
      const profile = await loadProfile(context, config);
      const updatedProfile = await ensureBaseToken(getFetch(context), config, profile);
      await saveProfile(context, updatedProfile);
      const response = await listServices(getFetch(context), config, updatedProfile);
      return {
        services: response.services.map((service) => ({
          id: service.id,
          slug: service.slug,
          name: service.name,
          connected: service.connected,
          requires_connection: service.requires_connection,
          proxy_url_slug: service.proxy_url_slug,
        })),
        total: response.total,
        page: response.page,
        per_page: response.per_page,
      };
    },
  • listServices() helper function: fetches /api/v1/keys for full service discovery (with fallback to /api/v1/proxy/services), returns a ServiceListResponse.
    export async function listServices(
      fetchImpl: FetchImpl,
      config: NyxIdPluginConfig,
      profile: TokenProfile,
    ): Promise<ServiceListResponse> {
      // Use /api/v1/keys for full service discovery (includes user-created services
      // with custom slugs like llm-anthropic-2). Falls back to /api/v1/proxy/services
      // for backward compatibility with older backends.
      const keysResponse = await fetchImpl(`${config.baseUrl}/api/v1/keys`, {
        headers: buildAuthHeaders(profile),
      });
    
      if (keysResponse.ok) {
        const keys = (await keysResponse.json()) as Array<{
          id: string;
          slug: string;
          label: string;
          status: string;
          endpoint_url: string;
          service_type: string;
          catalog_service_name: string | null;
          is_active: boolean;
        }>;
        return {
          services: keys.map((k) => ({
            id: k.id,
            slug: k.slug,
            name: k.label,
            connected: k.is_active && k.status === "active",
            requires_connection: false,
            proxy_url_slug: `/api/v1/proxy/s/${k.slug}`,
            service_category: k.service_type,
          })),
          total: keys.length,
          page: 1,
          per_page: keys.length,
        };
      }
    
      // Fallback to legacy endpoint
      const response = await fetchImpl(`${config.baseUrl}/api/v1/proxy/services`, {
        headers: buildAuthHeaders(profile),
      });
    
      if (!response.ok) {
        throw await readError(response);
      }
    
      return (await response.json()) as ServiceListResponse;
    }
  • ServiceListResponse interface defining the shape of the response (services array, total, page, per_page).
    export interface ServiceListResponse {
      services: NyxIdService[];
      total: number;
      page: number;
      per_page: number;
    }
  • NyxIdService interface defining individual service fields (id, slug, name, connected, etc.).
    export interface NyxIdService {
      id: string;
      name: string;
      slug: string;
      description: string | null;
      service_category: string;
      connected: boolean;
      requires_connection: boolean;
      proxy_url: string;
      proxy_url_slug: string;
    }
Behavior3/5

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

No annotations provided. Description mentions latency effect of include_endpoints but does not state read-only nature or auth requirements explicitly. Adequate but could be more transparent.

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 succinct sentences, front-loaded with purpose, details, and usage hint. No wasted words.

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?

No output schema but description details all returned fields. With 2 optional params and clear purpose, description is complete for a discovery tool.

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 coverage is 100%. Description adds meaning beyond schema: explains purpose of include_endpoints (adds latency, parsed endpoints) and category filter. Adds value.

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?

Description uses specific verb 'enumerate' and resource 'downstream services', listing returned fields. Clearly distinguishes from sibling tools (nyx_proxy_request, etc.).

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 states 'Use this for tool discovery before issuing nyx_proxy_request' and mentions scope limitation. Does not include 'when not to use' but context is clear.

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/ChronoAIProject/nyxid'

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