Skip to main content
Glama

create_association

Idempotent

Define a relationship between two Huly classes by specifying roles and cardinality. Idempotently creates the association or returns the existing one.

Instructions

Idempotently create one Huly association definition between two non-system classes. Use sourceClass/targetClass with sourceRole/targetRole and cardinality; returns an existing identical association by default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceClassYesa string that will be trimmed
targetClassYesa string that will be trimmed
sourceRoleYesa string that will be trimmed
targetRoleYesa string that will be trimmed
cardinalityYesAssociation cardinality: one-to-one, one-to-many, many-to-many
automationOnlyNoWhether Huly automation-only UI paths should own relation writes for this association. Defaults to false.
ifExistsNoreturn_existing (default) returns an identical existing association; fail reports an existing association as an error

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesThe successful tool result. The same value is also serialized as JSON in the text content for clients that do not read structuredContent.
warningsNoOptional agent-visible warnings about degraded result fidelity. Omitted when the server returned the documented happy-path payload.
Behavior3/5

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

Annotations already indicate idempotency and non-destructiveness. The description adds that it returns an existing identical association by default, reinforcing the idempotentHint. However, it does not disclose potential side effects, requirements (e.g., class existence), or constraints on system classes.

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?

The description is a single sentence that effectively front-loads the purpose and lists key parameters. It is concise and efficient, though a slightly more structured format could improve readability.

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

Completeness2/5

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

Despite having a well-described schema and output schema, the description lacks prerequisites (e.g., whether classes must exist) and does not explain 'non-system classes' or the distinction from 'create_relation'. For a tool with 7 parameters, more context is needed.

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

Parameters3/5

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

Schema description coverage is 100%, so baseline is 3. The description mentions sourceClass/targetClass and sourceRole/targetRole with cardinality but adds no new semantics beyond the schema. The 'automationOnly' and 'ifExists' parameters are not elaborated.

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

Purpose4/5

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

The description clearly states the tool idempotently creates a Huly association definition between two non-system classes, using specific parameters. It distinguishes from siblings like 'create_relation' by specifying it's a definition, not an instance. However, it could be more explicit about the distinction from 'create_relation'.

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?

The description implies usage for defining associations between classes and mentions key parameters. It explains the default behavior for 'ifExists'. But it does not explicitly state when to avoid this tool (e.g., for creating relation instances) or provide alternatives.

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/dearlordylord/huly-mcp'

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