INI win parse
ini-win-parse · version 1.0.0 · Structured formats · free, no key needed
Retrieve a Windows profile string, or list section or key names, with pinned profile rules.
Use when you need to: get private profile string · read windows initialization file key · lookup profile section and key.
Decide before calling
Read the versioned contract and the supported scope below. Reuse ini-win-parse@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use ini-win-parse@1.0.0 for get private profile string. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- get private profile string
- read windows initialization file key
- lookup profile section and key
- enumerate windows profile section names
- list keys in a private profile section
- private profile string default value
- truncate profile string to buffer size
- case insensitive windows profile lookup
Not supported
- read IniFileMapping from the registry
- decode an ANSI code page
- accept semicolon comments or colon separators
- write a value back into the profile
Behavior
- Grammar getprivateprofilestring-pinned-1. Lines split on LF, CR LF, or CR. Lines that are only U+0020 and U+0009 are ignored. A line whose first non-padding character is ; or # is unsupported_input. A non-section line with no = and a : is an unsupported colon separator. Other non-section lines are invalid_input.
- A section header is a padding-trimmed [name] whose ] is the last character. The name is trimmed of U+0020 and U+0009. Lookup searches only the first section span whose name matches with ASCII A-Z folding.
- A key splits on the first =. The key is padding-trimmed. The value keeps characters after =, including leading spaces. Trailing U+0020 blanks are removed. One enclosing pair of ASCII quotes is then removed, and trailing blanks are removed again. Backslash and an interior semicolon or colon stay literal.
- The first matching key in that span wins. duplicate_key is true when a later key in the same span folds to the same name. A later duplicate section header starts a new span and is not merged.
- A missing section or key copies default_value after trailing-blank removal, or the empty string when default_value is omitted. Quotes on the default are kept. The query itself is not trimmed.
- buffer_chars counts Unicode code points and includes the terminating null. Value mode copies buffer_chars-1 code points when the string does not fit. Enumeration packs each name plus NUL and one extra NUL; when that image does not fit it keeps buffer_chars-2 code points of the packed body. Names are a JSON array, not an embedded-NUL string.
- Limits fail before a completed result is returned. __proto__ and constructor are ordinary profile names stored in strings and arrays.
Input
text(string, required): max length 4096section(string, optional): min length 1; max length 64key(string, optional): min length 1; max length 64default_value(string, optional): max length 512buffer_chars(integer, optional): min 1; max 4096
Output
grammar(constant "getprivateprofilestring-pinned-1", required)mode(one of "value", "keys", "sections", required)found(boolean, required)value(string, required): max length 512names(array of string, required): max items 128; each max length 64truncated(boolean, required)copied_chars(integer, required): min 0; max 8192matched_section(string or null, required): max length 64matched_key(string or null, required): max length 64duplicate_key(boolean, required)
Limits
- max input bytes: 4096
- max lines: 200
- max sections: 32
- max keys: 128
- max name chars: 64
- max value chars: 512
- max depth: 8
- max nodes: 1024
- max buffer chars: 4096
- max default bytes: 2048
- max output bytes: 1024
Example
Request input:
{
"text": "[section]\nkey=string\n",
"section": "section",
"key": "key"
}
Response:
{
"result": {
"grammar": "getprivateprofilestring-pinned-1",
"mode": "value",
"found": true,
"value": "string",
"names": [],
"truncated": false,
"copied_chars": 6,
"matched_section": "section",
"matched_key": "key",
"duplicate_key": false
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "ini-win-parse",
"version": "1.0.0",
"input": {
"text": "[section]\nkey=string\n",
"section": "section",
"key": "key"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/ini-win-parse/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"text":"[section]\nkey=string\n","section":"section","key":"key"}'
The machine-readable contract is at /v1/tools/ini-win-parse/versions/1.0.0.
CLI
node cli.mjs run ini-win-parse 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- INI win format: Format sections and keys into stable Windows initialization-file text.
- INI win validate: Check initialization-file text against the pinned Windows profile grammar.
- Systemd directive list: List systemd unit directives as words using syntax quoting, continuation, and resets.
- Systemd .env parse: Parse a systemd EnvironmentFile into assignments, a last-wins map, and duplicate keys.
- Asn1 der parse: Parse one ASN.1 DER value into a flat schema-free TLV node list.
- Gitconfig key list: List git config keys in file order with qualified names and occurrences.