Skip to main content
Glama

instantiate_contract

Execute a registered contract: validates inputs against schema, resolves source/sink overrides, runs assembly steps, returns output or structured error envelope.

Instructions

Execute a registered contract end-to-end. Zod-validates inputs against the contract's inputZodSchema (additionalProperties:false rejects typos). Resolves source/sink overrides per D-A4b default chain (explicit → config → contract literal → error if required); sinks are MemorySink-only per D-A4c (MEM-05 invariant un-bypassable). Runs each assembly step through verbDispatcher with template resolution + named-binding accumulation. write_back routes through DeliveryAdapter.write() (MEM-05 chokepoint). Returns the Q-OUTPUT bundle {steps, write_back} on success OR a structured InstantiateError envelope (12 sealed reasons per ADR-006 §Decision 7). Omit vault on single-vault setups; multi-vault setups require it (returns ambiguous_vault otherwise).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesRegistered contract name
inputsNoContract inputs; validated against the contract's inputZodSchema
source_overridesNoOverride declared source handles by handle name
sink_overridesNoOverride declared sink handles by handle name. Targets MUST resolve through MemorySinkRegistry (D-A4c).
vaultNoVault name; omit on single-vault setups
Behavior5/5

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

Discloses Zod validation with additionalProperties false, source/sink override chain, MemorySink-only constraint, assembly steps, write_back routing, and structured error envelope with 12 sealed reasons. With no annotations, the description carries full burden and delivers extensively.

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?

Dense with information, each sentence adds value. Front-loaded with main purpose. Slightly verbose but necessary given complexity; no fluff.

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 input validation, overrides, execution flow, and error handling. Returns bundle structure explained. Lacks example of error envelope but sufficient for an execute tool without output schema.

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?

Adds meaning beyond schema: explains validation behavior, override resolution chain, and vault conditions. Schema coverage is 100%, but description enriches understanding of each parameter's role and constraints.

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?

Clearly states 'Execute a registered contract end-to-end,' specifying the verb and resource. Distinguishes from siblings like describe_contract or register_contracts_as_tools.

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?

Provides context for vault parameter (omit in single-vault, required in multi-vault) but does not explicitly state when to use this tool over alternatives. Implied usage from the execution nature.

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/owrede/vault-memory'

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