iflytek/astron-agent · error · CustomException

SPARK_LINK_TOOL_NOT_EXIST_ERROR

SPARK_LINK_TOOL_NOT_EXIST_ERROR

Error message

Tool ID is empty

What it means

parse_react_schema_list() iterates the tool schemas fetched from Spark Link and requires every schema entry to have an id. When a tool_schema dict has no id (None), SPARK_LINK_TOOL_NOT_EXIST_ERROR is raised with the offending schema as cause_error. It indicates the Link platform returned a malformed/incomplete tool descriptor.

Solutions

  1. Inspect cause_error to identify the offending tool record and remove/recreate that tool on the Link platform
  2. Refresh the tool list (the tool may have been deleted or modified concurrently); re-instantiate the client
  3. Check for Link API version changes that alter the schema response shape
Defensive patterns

Strategy: validation

Validate before calling

missing = [t for t in schemas if t.get("id") is None]
if missing:
    raise ValueError(f"tool schemas missing id: {missing}")

Type guard

def has_id(t): return isinstance(t, dict) and t.get("id") is not None
valid = [t for t in open_api_schema_list if has_id(t)]

Prevention

When it happens

Trigger: Client __init__ runs parse_react_schema_list and encounters open_api_schema_list entry whose get("id") is None — i.e. the Link API returned a tool record without an id field.

Common situations: Link platform data corruption or a partially deleted tool still being listed, API version mismatch returning a different schema shape, or a filtered/permission-limited token causing incomplete records.

Related errors


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/8fcbc99679b7b7f2. Report an issue: GitHub.

Appendix: source

Thrown at core/workflow/engine/nodes/plugin_tool/link_client.py:463

                    "description": parameter_description,
                    "type": parameter_type,
                }
        # Add top-level required fields
        request_body_required = body_schema.get("required", [])
        required_set.update(request_body_required)

    def parse_react_schema_list(self) -> None:
        """
        Parse OpenAPI schemas and generate Tool instances for ReAct framework.

        This method processes the retrieved OpenAPI schemas to create Tool instances
        for each available operation. It handles both query parameters and request
        body parameters, merging them into a unified parameter structure.
        """
        for tool_schema in self.open_api_schema_list:
            tool_id = tool_schema.get("id")
            if tool_id is None:
                raise CustomException(
                    CodeEnum.SPARK_LINK_TOOL_NOT_EXIST_ERROR,
                    err_msg="Tool ID is empty",
                    cause_error=json.dumps(tool_schema, ensure_ascii=False),
                )
            tool_schema = json.loads(tool_schema.get("schema", "{}"))
            # Process each path and method in the OpenAPI schema
            for path, path_schema in tool_schema.get("paths", {}).items():
                for method, method_schema in path_schema.items():
                    action_name = method_schema.get(
                        "operationId", ""
                    )  # Tool operation name
                    # Parse query parameters
                    query_schema = method_schema.get("parameters", [])
                    query_parameters, query_required = self.parse_request_query_schema(
                        query_schema
                    )
                    # Parse request body (currently only supports application/json format)
                    request_body_schema = (

View on GitHub (pinned to 5e758547a8)