{"record":{"id":"8fcbc99679b7b7f2","repo":"iflytek/astron-agent","slug":"spark-link-tool-not-exist-error","errorCode":"SPARK_LINK_TOOL_NOT_EXIST_ERROR","errorMessage":"Tool ID is empty","messagePattern":"Tool ID is empty","errorType":"error_code","errorClass":"CustomException","httpStatus":null,"severity":"error","filePath":"core/workflow/engine/nodes/plugin_tool/link_client.py","lineNumber":463,"sourceCode":"                    \"description\": parameter_description,\n                    \"type\": parameter_type,\n                }\n        # Add top-level required fields\n        request_body_required = body_schema.get(\"required\", [])\n        required_set.update(request_body_required)\n\n    def parse_react_schema_list(self) -> None:\n        \"\"\"\n        Parse OpenAPI schemas and generate Tool instances for ReAct framework.\n\n        This method processes the retrieved OpenAPI schemas to create Tool instances\n        for each available operation. It handles both query parameters and request\n        body parameters, merging them into a unified parameter structure.\n        \"\"\"\n        for tool_schema in self.open_api_schema_list:\n            tool_id = tool_schema.get(\"id\")\n            if tool_id is None:\n                raise CustomException(\n                    CodeEnum.SPARK_LINK_TOOL_NOT_EXIST_ERROR,\n                    err_msg=\"Tool ID is empty\",\n                    cause_error=json.dumps(tool_schema, ensure_ascii=False),\n                )\n            tool_schema = json.loads(tool_schema.get(\"schema\", \"{}\"))\n            # Process each path and method in the OpenAPI schema\n            for path, path_schema in tool_schema.get(\"paths\", {}).items():\n                for method, method_schema in path_schema.items():\n                    action_name = method_schema.get(\n                        \"operationId\", \"\"\n                    )  # Tool operation name\n                    # Parse query parameters\n                    query_schema = method_schema.get(\"parameters\", [])\n                    query_parameters, query_required = self.parse_request_query_schema(\n                        query_schema\n                    )\n                    # Parse request body (currently only supports application/json format)\n                    request_body_schema = (","sourceCodeStart":445,"sourceCodeEnd":481,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/core/workflow/engine/nodes/plugin_tool/link_client.py#L445-L481","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Inspect cause_error to identify the offending tool record and remove/recreate that tool on the Link platform","Refresh the tool list (the tool may have been deleted or modified concurrently); re-instantiate the client","Check for Link API version changes that alter the schema response shape"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"missing = [t for t in schemas if t.get(\"id\") is None]\nif missing:\n    raise ValueError(f\"tool schemas missing id: {missing}\")","typeGuard":"def has_id(t): return isinstance(t, dict) and t.get(\"id\") is not None\nvalid = [t for t in open_api_schema_list if has_id(t)]","tryCatchPattern":null,"preventionTips":["Filter out schemas without ids before parsing","Re-fetch the tool list when a malformed record appears","Report malformed tool records to the Link platform admin"],"tags":["spark-link","schema","api"],"backgroundTag":"unexpected-response-shape","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}