# This file is automatically generated by ravepipeline::mcptool_build(). 
# Please never edit this file by hand!
name: ieegio-mcp_tool_volume_discover
description: Search a directory for neuroimaging volume files (NIfTI and MGZ formats).
  Returns a list of found files with basic metadata including file paths, sizes, and
  formats. Useful for discovering available volume files before reading them with
  ieegio-mcp_tool_volume_read.
parameters:
  type: object
  properties:
    pattern:
      type: string
      description: 'Optional filename pattern to filter results. Empty string (default)
        returns all volume files. Otherwise, only files whose basename matches the
        pattern are included. Example values: "brain", "T1", "subject01"'
      default: ''
      examples:
      - brain
      - T1
      - subject01
    recursive:
      type: boolean
      description: 'Whether to search subdirectories recursively. Defaults to TRUE.
        Example values: TRUE, FALSE'
      default: yes
      examples:
      - 'TRUE'
      - 'FALSE'
    path:
      type: string
      description: 'Absolute or relative path to the directory to search. Example
        values: "/data/subjects", "~/imaging/scans"'
      examples:
      - /data/subjects
      - ~/imaging/scans
  required:
  - path
category: discovery
returns:
  type: object
  properties:
    error:
      type: string
      description: Character, error message if success is FALSE
    files:
      type: object
      description: List of file relative-paths
    count:
      type: integer
      description: Integer, number of volume files found
    success:
      type: boolean
      description: Logical, whether the search completed successfully
implementation_example: |
  # Discover all volume files in sample data directory
  sample_dir <- dirname(ieegio_sample_data("nifti/rnifti_example.nii.gz"))
  ieegio:::mcp_tool_volume_discover(sample_dir)
  #
  #> $success
  #> [1] TRUE
  #> 
  #> $count
  #> [1] 1
  #> 
  #> $files
  #> [1] "rnifti_example.nii.gz"
  #>
execution_time: 0.002
