Skip to content

Data: Config File Token-Saving Inspection Tools (Medium Priority) #62

Description

@jwesleye

Overview

Add memory-efficient inspection tools for configuration files (YAML, TOML, INI) to help agents avoid loading entire configs into context, similar to JSON token-saving tools.

Motivation

Config files already have read/write support, but large configuration files (especially multi-environment configs) can be verbose. Agents often need to inspect structure or extract specific values without loading entire files.

Proposed Functions

Medium Priority - Inspection Tools

  • get_config_keys - List keys at path without loading values (YAML/TOML/INI)
  • get_config_value_at_path - Get specific nested value by path (dot notation)
  • get_config_structure - Get schema/hierarchy overview without values
  • search_config_keys - Find all paths containing keys matching pattern
  • count_config_items - Count keys/sections at path

Medium Priority - Selective Access

  • select_config_keys - Extract only specific keys from config
  • filter_config_sections - Get only sections matching criteria (INI focus)
  • preview_config_section - Get first N items from section

Design Principles

  • Google ADK compliant (JSON-serializable types, no defaults)
  • @strands_tool decorator
  • Support YAML, TOML, and INI formats
  • Path notation for nested access (dot notation)
  • Consistent with JSON token-saving patterns
  • Work with existing read_yaml_file, read_toml_file, read_ini_file

Related

  • Extends existing data/config_processing.py functions
  • Similar pattern to JSON: get_json_value_at_path, get_json_keys, search_json_keys
  • Related to issue Data: Future Enhancement Features #57 (Data Future Enhancements)

Module

data/config_processing.py

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions