Skip to main content
Glama
pkp124

cmake-build-model

by pkp124

Get CMake cache variables

get_cache_variables
Read-only

Read CMake cache entries (name, type, value, help) from a build directory, with optional name filtering and controls for advanced or internal entries.

Instructions

Returns CMake cache entries (name, type, value, help string), optionally filtered by name. Advanced entries are hidden unless includeAdvanced is set or a filter is given.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoName filter: substring, glob or /regex/.
buildDirNoBuild directory (absolute, or relative to a workspace root). A source directory with a single build directory is also accepted. May be omitted when the workspace has exactly one build directory.
includeAdvancedNoInclude entries marked as advanced.
includeInternalNoInclude INTERNAL and STATIC entries.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false. The description adds genuinely non-obvious behavior: advanced entries are suppressed by default and revealed either by includeAdvanced or by supplying a filter. That conditional visibility rule is behavior an agent could not derive from the annotations alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, with the return shape front-loaded and the visibility caveat immediately after. Every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but the description names the returned fields, and the default-visibility rule fills the main behavioral gap. Minor omission: no mention of ordering, size, or what happens when buildDir resolution fails.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description goes further by explaining that `filter` has a side effect of exposing advanced entries, which is a semantic interaction between two parameters not stated in either schema entry.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Returns) and resource (CMake cache entries), and enumerates the returned fields (name, type, value, help string). No sibling tool deals with cache variables, so the purpose is unambiguous without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage through 'optionally filtered by name' and the advanced-entry rule, but never states when to reach for this tool versus siblings like get_cmake_inputs or list_presets. No exclusions or prerequisites are given, so the agent must infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.