Skip to main content
Glama

Add Knowledge Relationships

add_knowledge_relationships

Bulk create relationships between existing entities in a knowledge graph to map connections like AUTHORED or REFERENCES.

Instructions

Bulk create relationships between entities in the knowledge graph. Each relationship needs from_id, to_id (matching existing entity_ids), rel_type (matching schema — e.g., 'AUTHORED', 'COVERS', 'REFERENCES'), and optional properties.

Use get_knowledge_schema first to see available relationship types.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_codeYesProject code (e.g., 'abc12345') — from list_knowledge_projects
relationshipsYesArray of relationships to create
environmentNoTarget environmentstaging
Behavior4/5

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

Annotations provide readOnlyHint=false (mutation), openWorldHint=true (flexible schema), idempotentHint=false (non-idempotent), and destructiveHint=false (non-destructive). The description adds valuable context beyond this by specifying it's a 'bulk create' operation, mentioning that entities must already exist ('matching existing entity_ids'), and that properties are optional. No contradiction with annotations.

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

Conciseness5/5

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

Two sentences with zero waste. The first sentence clearly states the purpose and key requirements. The second sentence provides crucial usage guidance. Every word earns its place, and the structure is front-loaded with the core functionality.

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?

For a mutation tool with no output schema, the description provides good context about the operation's nature (bulk create), prerequisites (existing entities, need to check schema), and scope (relationships with optional properties). The annotations cover safety aspects well. Minor gap: doesn't mention response format or error handling.

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 the schema already fully documents all parameters. The description adds minimal semantic context by mentioning that from_id/to_id must match 'existing entity_ids' and that rel_type must match 'schema', but doesn't provide additional meaning beyond what's in the schema descriptions. Baseline 3 is appropriate when schema does the heavy lifting.

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?

The description clearly states the specific action ('Bulk create relationships'), the resource ('between entities in the knowledge graph'), and distinguishes from siblings by focusing on relationships rather than nodes, projects, or other operations. It provides concrete examples of relationship types like 'AUTHORED' and 'COVERS'.

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?

The description explicitly provides when-to-use guidance by stating 'Use get_knowledge_schema first to see available relationship types.' This names a specific alternative tool (get_knowledge_schema) that should be used as a prerequisite, giving clear context for proper tool selection.

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/velosovictor/graforest-mcp'

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