Skip to main content
Glama

ck_validate

Validate code, config, shell commands, or text against CK policy before execution. Returns violations as findings to prevent unsafe actions.

Instructions

Validate proposed code, config, shell commands, or text against CK policy before execution. Read-only — no changes are applied to the project. Returns a validation result with any policy violations as findings. content is required. kind classifies the artifact (code/config/shell/text) for policy routing. source_type identifies the content's origin (developer, tool_output, human_review, issue, pull_request, web) for trust-boundary checks; untrusted sources receive stricter scrutiny. domain_pack applies a domain-specific policy pack (e.g., hipaa, owasp). requested_capabilities declares what the content needs (network, filesystem, shell, deploy) so the trust boundary can evaluate the request. Call ck_validate before writing files, running shell commands, or executing generated code. If validation returns blocked findings, do not proceed — use ck_finding to record them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
artifact_typeNoCanonical artifact type. Compatibility aliases `instruction` and `text` are accepted and normalized to `source`.
contentYesThe content to validate or process: source code, config text, shell command, or freeform text.
domain_packNoDomain-specific policy pack to apply during validation.
intended_useNoHow the validated content will be used after validation.
kindNoArtifact kind classification for validation routing.
pathNoFile or directory path relative to the project root.
requested_capabilitiesNo
security_workflow_phaseNoCanonical workflow phase. Compatibility aliases such as `preflight`, `analysis`, and `pre_edit` are accepted and normalized.
session_idNoUnique session identifier for correlating findings, proofs, budget, and audit trail.
source_typeNoOrigin category of the record (e.g., developer, tool_output, human_review).
target_scopeNoDeployment scope of the artifact being validated.
task_idNoTask identifier within the session for scoped operations.
trust_levelNo
Behavior4/5

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

Without annotations, description carries full burden. Clearly states read-only and returns findings. Does not detail auth or rate limits, which is acceptable given the safe nature. Could mention idempotency but not required.

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

Conciseness4/5

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

Well-structured with initial summary then parameter details. Slightly lengthy (~10 sentences) but justified by parameter complexity. No redundancy.

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?

Covers purpose, usage, parameters, and behavioral guidance. Lacks explicit output format details; 'Returns a validation result with findings' is vague. Without output schema, more detail on return structure would improve completeness.

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

Parameters5/5

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

Description adds significant value beyond schema: explains routing logic for 'kind', trust-boundary for 'source_type', domain policy packs, and capability declarations. Schema coverage is high (85%), but parameters like 'requested_capabilities' gain clarity from description.

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?

Description starts with clear verb ('Validate') and resource ('proposed code, config, shell commands, or text'), and explicitly states read-only nature. Distinguishes from siblings like ck_execute_code and ck_finding by specifying the pre-execution validation role.

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

Usage Guidelines5/5

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

Explicitly instructs to call before writing files or running commands, and directs to use ck_finding if validation blocks. Provides clear when-to-use and alternative path.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aryaminus/controlkeel'

If you have feedback or need assistance with the MCP directory API, please join our Discord server