---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/tools/parsing/variables/parseKvTool.md
description: Extract key-value pairs from text.
---

# Variable: parseKvTool

```ts
const parseKvTool: Tool<SpooledJsonArtifact<unknown>>;
```

Defined in: [batteries/tools/parsing/index.ts:118](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/tools/parsing/index.ts#L118)

Extract key-value pairs from text.

## Remarks

Handles `.env` files, config files, and query strings. `kv_delimiter` chooses the
key→value separator (`=`, `:`, or `auto`); `pair_delimiter` selects how pairs are separated
(`newline`, `comma`, `semicolon`, `ampersand`). Surrounding single or double quotes around
values are stripped. Comment lines starting with `#` are skipped by default.
