test_case_id: convert_unsupported_type
description: "Tests that the tool returns an error when the input file type is not supported."
tags: ["all","agent","tools","general_agent_tools"]
skip_intermediate_events: true

setup_artifacts:
  - filename: "unsupported.bin"
    content_base64: "0A1B2C3D" # Some dummy binary data
    mime_type: "application/octet-stream"

gateway_input:
  user_prompt: "Please convert the file unsupported.bin to markdown."
  target_agent_name: "TestAgent"
  user_identity: "test_user@example.com"
  external_context:
    a2a_session_id: "session_convert_unsupported_type"

llm_interactions:
  - static_response:
      choices:
        - message:
            role: "assistant"
            tool_calls:
              - id: "call_convert_unsupported"
                type: "function"
                function:
                  name: "convert_file_to_markdown"
                  arguments: '{"input_filename": "unsupported.bin"}'
    expected_request:
      tools_present:
        - "convert_file_to_markdown"

  - static_response:
      choices:
        - message:
            role: "assistant"
            content: "I am sorry, but I cannot convert `unsupported.bin` because its file type is not supported."
    expected_request:
      expected_tool_responses_in_llm_messages:
        - tool_call_id_matches_prior_request_index: 0
          response_json_matches:
            status: "error"
            message_matches_regex: "Unsupported file format for MarkItDown: .*"

expected_gateway_output:
  - type: final_response
    task_state: "completed"
    content_parts:
      - type: text
        text_contains: "I am sorry, but I cannot convert `unsupported.bin` because its file type is not supported."

expected_artifacts: []
