{
  "db_name": "PostgreSQL",
  "query": "select\n                w.id as workspace_id,\n                w.slug as workspace_slug,\n                a.id as agent_id,\n                a.slug as agent_slug,\n                b.tool_name,\n                b.tool_title,\n                coalesce(b.tool_description_override, ov.tool_description_json->>'description') as \"tool_description!\",\n                o.id,\n                o.name,\n                o.display_name,\n                o.category,\n                o.protocol,\n                o.created_at as \"operation_created_at!: time::OffsetDateTime\",\n                o.updated_at as \"operation_updated_at!: time::OffsetDateTime\",\n                o.published_at as \"operation_published_at: time::OffsetDateTime\",\n                ov.version,\n                ov.status,\n                ov.target_json,\n                ov.input_schema_json,\n                ov.output_schema_json,\n                ov.input_mapping_json,\n                ov.output_mapping_json,\n                ov.execution_config_json,\n                ov.tool_description_json,\n                ov.samples_json,\n                ov.generated_draft_json,\n                ov.config_export_json,\n                ov.change_note,\n                ov.created_at as \"created_at!: time::OffsetDateTime\",\n                ov.created_by\n             from workspaces w\n             join agents a on a.workspace_id = w.id\n             join published_agents pa on pa.agent_id = a.id\n             join agent_operation_bindings b on b.agent_id = a.id and b.agent_version = pa.version\n             join operation_versions ov on ov.operation_id = b.operation_id and ov.version = b.operation_version\n             join operations o on o.id = ov.operation_id and o.workspace_id = w.id\n             where w.slug = $1 and a.slug = $2 and b.enabled = true\n             order by b.tool_name asc",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "workspace_id",
        "type_info": "Text"
      },
      {
        "ordinal": 1,
        "name": "workspace_slug",
        "type_info": "Text"
      },
      {
        "ordinal": 2,
        "name": "agent_id",
        "type_info": "Text"
      },
      {
        "ordinal": 3,
        "name": "agent_slug",
        "type_info": "Text"
      },
      {
        "ordinal": 4,
        "name": "tool_name",
        "type_info": "Text"
      },
      {
        "ordinal": 5,
        "name": "tool_title",
        "type_info": "Text"
      },
      {
        "ordinal": 6,
        "name": "tool_description!",
        "type_info": "Text"
      },
      {
        "ordinal": 7,
        "name": "id",
        "type_info": "Text"
      },
      {
        "ordinal": 8,
        "name": "name",
        "type_info": "Text"
      },
      {
        "ordinal": 9,
        "name": "display_name",
        "type_info": "Text"
      },
      {
        "ordinal": 10,
        "name": "category",
        "type_info": "Text"
      },
      {
        "ordinal": 11,
        "name": "protocol",
        "type_info": "Text"
      },
      {
        "ordinal": 12,
        "name": "operation_created_at!: time::OffsetDateTime",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 13,
        "name": "operation_updated_at!: time::OffsetDateTime",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 14,
        "name": "operation_published_at: time::OffsetDateTime",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 15,
        "name": "version",
        "type_info": "Int4"
      },
      {
        "ordinal": 16,
        "name": "status",
        "type_info": "Text"
      },
      {
        "ordinal": 17,
        "name": "target_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 18,
        "name": "input_schema_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 19,
        "name": "output_schema_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 20,
        "name": "input_mapping_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 21,
        "name": "output_mapping_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 22,
        "name": "execution_config_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 23,
        "name": "tool_description_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 24,
        "name": "samples_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 25,
        "name": "generated_draft_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 26,
        "name": "config_export_json",
        "type_info": "Jsonb"
      },
      {
        "ordinal": 27,
        "name": "change_note",
        "type_info": "Text"
      },
      {
        "ordinal": 28,
        "name": "created_at!: time::OffsetDateTime",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 29,
        "name": "created_by",
        "type_info": "Text"
      }
    ],
    "parameters": {
      "Left": [
        "Text",
        "Text"
      ]
    },
    "nullable": [
      false,
      false,
      false,
      false,
      false,
      false,
      null,
      false,
      false,
      false,
      false,
      false,
      false,
      false,
      true,
      false,
      false,
      false,
      false,
      false,
      false,
      false,
      false,
      false,
      true,
      true,
      true,
      true,
      false,
      true
    ]
  },
  "hash": "aa5a728d3d53aa0730497e9c75ccf1d385f00c6401ce0b17416b0009cf3f6ff3"
}
