Skip to main content
Glama

archy_contracts

Call after any Python edit that adds, removes, or changes an import statement to enforce architecture contracts like Layers, Forbidden, and AcyclicSiblings via import-linter.

Instructions

Call after any Python edit that adds, removes, or changes an import statement, especially across package boundaries. A failed contract means the new import violates the architecture - revert or restructure before continuing. Runs import-linter contracts (transitive Layers, Forbidden, Independence, Protected, AcyclicSiblings); stricter than archy_check, which only catches direct edges between layers in archy.yaml. Reads .importlinter (or pyproject.toml). Requires pip install archy[contracts].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
config_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
availableYes
errorNo
all_keptNo
keptNo
brokenNo
module_countNo
import_countNo
contractsNo
Behavior4/5

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

Describes behavioral traits: runs multiple contract types, reads config from .importlinter or pyproject.toml, and is stricter than archy_check. Lacks some specifics about output format or exact conditions, but covers key aspects. No annotations provided, so description carries full burden.

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?

Concise with a bolded key sentence up front. Includes relevant details but could be slightly more streamlined. Every sentence adds value.

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?

Given the tool's complexity (2 params, output schema exists), the description covers usage context, behavior, and prerequisites. Missing parameter explanations, but overall sufficiently complete for a check tool.

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

Parameters2/5

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

Schema description coverage is 0%, and the description does not explain the path or config_path parameters. It mentions 'import-linter contracts' but does not link to parameters, leaving agents to infer usage from context.

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 the tool is for checking import-linter contracts after Python edits that modify imports, and distinguishes itself from sibling archy_check by being stricter. Uses specific verb and resource.

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 specifies when to call (after import changes, especially across package boundaries) and provides actionable advice on failure (revert or restructure). Also contrasts with archy_check and mentions installation requirement.

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/hslee16/archy'

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