# This file is automatically generated by ravepipeline::mcptool_build(). 
# Please never edit this file by hand!
name: ieegio-mcp_tool_volume_list
description: List all volumes currently cached in session state. Returns basic metadata
  for each cached volume including its ID, reference paths, original format, and dimensions.
  This helps track which volumes are available for use by other MCP tools.
parameters:
  type: object
  properties: {}
category: info
returns:
  type: object
  properties:
    error:
      type: string
      description: Character, error message if success is FALSE
    volumes:
      type: array
      description: 'List of volume metadata, each containing: id{Character, volume
        identifier} paths{Character vector, file paths associated with this volume}
        format{Character, original format ("nifti" or "mgz")} shape{Integer vector,
        volume dimensions} type{Character vector, volume type information} }'
      items:
        type: string
    count:
      type: integer
      description: Integer, number of cached volumes
    success:
      type: boolean
      description: Logical, whether the operation completed successfully
implementation_example: |
  # Read multiple volumes and list them
  # Note: .state_env is automatically provided when called via MCP.
  # AI does not need to specify this argument. The examples only use
  # .state_env to make the code runnable for demonstration purposes.
  state_env <- fastmap::fastmap()
  file1 <- ieegio_sample_data("nifti/rnifti_example.nii.gz")
  ieegio:::mcp_tool_volume_read(file1, .state_env = state_env)
  file2 <- ieegio_sample_data("brain.demosubject.mgz")
  ieegio:::mcp_tool_volume_read(file2, .state_env = state_env)
  # List all cached volumes
  ieegio:::mcp_tool_volume_list(.state_env = state_env)
  #
  #> $success
  #> [1] TRUE
  #> 
  #> $count
  #> [1] 2
  #> 
  #> $volumes
  #> $volumes[[1]]
  #> $volumes[[1]]$id
  #> [1] "e1ccd803b62bb9390d3debbd05f32042"
  #> 
  #> $volumes[[1]]$paths
  #> [1] "/Users/dipterix/Library/Caches/org.R-project.R/R/ieegio/sample_data/nifti/rnifti_example.nii.gz"
  #> 
  #> $volumes[[1]]$format
  #> [1] "nifti"
  #> 
  #> $volumes[[1]]$shape
  #> [1] 96 96 60
  #> 
  #> $volumes[[1]]$type
  #> [1] "rnifti" "nifti" 
  #> 
  #> 
  #> $volumes[[2]]
  #> $volumes[[2]]$id
  #> [1] "b746f9115860a27ea37be5995feb5486"
  #> 
  #> $volumes[[2]]$paths
  #> [1] "/Users/dipterix/Library/Caches/org.R-project.R/R/ieegio/sample_data/brain.demosubject.mgz"
  #> 
  #> $volumes[[2]]$format
  #> [1] "mgz"
  #> 
  #> $volumes[[2]]$shape
  #> [1] 256 256 256
  #> 
  #> $volumes[[2]]$type
  #> [1] "rnifti" "nifti" 
  #> 
  #> 
  #>
execution_time: 3.417
