Skip to main content
Glama
pkp124

cmake-build-model

by pkp124

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CMAKE_MCP_ROOTSNoWorkspace root to scan (repeatable). Without roots, the client's MCP roots are used, else the current directory.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_projectsB

Lists top-level CMake source projects and build directories found under the workspace roots, including which source directory each build directory belongs to, its generator/build type and whether a File API reply is available and up to date.

register_build_dirA

Adds an existing CMake build directory (one containing CMakeCache.txt) that lies outside the workspace roots, e.g. /tmp/build-foo, so the other tools can query it.

list_presetsB

Lists the configure and build presets from CMakePresets.json / CMakeUserPresets.json of a source directory, with resolved binary directories.

get_project_summaryA

High-level overview of a configured build directory: CMake version, generator, configurations, the project() hierarchy and target names grouped by type.

list_targetsB

Lists build targets with type, project, defining directory, artifacts and languages.

get_targetB

Full details of one target: artifacts, where it is defined, dependencies, link/archive command fragments, install destinations, and per compile group the language standard, flags, defines and include directories, plus its source files.

get_target_dependenciesA

Returns the targets a target depends on (dependencies) or the targets depending on it (dependents), directly or transitively, including an adjacency list for the transitive graph.

find_file_targetsA

Finds which targets (in which build directories and configurations) compile a given source file, and returns the effective language, standard, flags, defines and include directories from the File API together with the exact compiler command(s) from the build directory's compile_commands.json. For headers not listed as sources, returns targets whose include directories contain the file. Searches all known build directories unless buildDir is given.

get_compile_commandsA

Reads the exact compiler invocations from compile_commands.json in a build directory, filtered by file, path pattern, target and/or configuration. When file is given without buildDir, every build directory of the workspace that compiles the file is searched. Each entry has the working directory, the argument list, the original command string (when the database uses command) and the output file.

get_cache_variablesA

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.

get_toolchainsB

Returns the compilers used per language (path, id, version, target) including implicit include and link directories.

get_cmake_inputsB

Lists the files CMake read during configuration (CMakeLists.txt, included .cmake modules, configure_file inputs, etc.) and glob-dependent file lists.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 12 tools

Disambiguation4/5

Tools are mostly distinct, but find_file_targets and get_compile_commands overlap in returning compiler commands for a file, and get_target includes dependency information that get_target_dependencies also provides. Descriptions mitigate confusion, but the boundaries are not perfectly clean.

Naming Consistency5/5

Consistent snake_case verb_noun pattern throughout (list_, get_, find_, register_), with no mixed conventions or vague verbs.

Tool Count5/5

12 tools is well-scoped for a CMake build model inspector; each tool covers a distinct aspect such as projects, targets, dependencies, cache, toolchains, and inputs without redundancy.

Completeness4/5

The core inspection surface is comprehensive, covering projects, targets, dependencies, compile commands, cache variables, toolchains, and CMake inputs. Minor gaps include no tool to unregister a build directory or retrieve full preset details beyond resolved binary directories.

Maintenance

ActivityMaintained
ResponsivenessNo issues