All tools
ToolWrite

Create library relationships

create_library_relationships

Use when connecting one new artifact, note, draft, or source to several graph nodes in one agent workflow.

When to use it

Use when connecting one new artifact, note, draft, or source to several graph nodes in one agent workflow.

Typical workflow

Inspect existing relationships before creating, updating, or cleaning edges.

What it returns

Graph neighbors, explicit relationships, cleanup results, or relationship ids.

Avoid using it when

You only need visual canvas edges; canvas is separate from the knowledge graph.

Advanced input contract

Agent hosts use this JSON Schema to validate the exact input shape.

View full registry notes

Create or restore multiple explicit Prism library knowledge graph relationships in one call. Uses the same ownership validation and dedupe/upsert semantics as create_library_relationship. Use when: Use when connecting one new artifact, note, draft, or source to several graph nodes in one agent workflow.

View JSON Schema
{
  "type": "object",
  "properties": {
    "relationships": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "bottleneck",
                  "claim",
                  "company",
                  "sector",
                  "library_artifact",
                  "library_canvas",
                  "library_document",
                  "library_file",
                  "library_file_chunk",
                  "library_content_chunk",
                  "library_folder",
                  "portfolio_holding",
                  "thesis_review",
                  "published_post",
                  "draft",
                  "observation",
                  "research_model",
                  "research_assumption",
                  "research_entity",
                  "project_watchlist_item",
                  "research_monitor",
                  "url"
                ]
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false
          },
          "target": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "bottleneck",
                  "claim",
                  "company",
                  "sector",
                  "library_artifact",
                  "library_canvas",
                  "library_document",
                  "library_file",
                  "library_file_chunk",
                  "library_content_chunk",
                  "library_folder",
                  "portfolio_holding",
                  "thesis_review",
                  "published_post",
                  "draft",
                  "observation",
                  "research_model",
                  "research_assumption",
                  "research_entity",
                  "project_watchlist_item",
                  "research_monitor",
                  "url"
                ]
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false
          },
          "relationshipType": {
            "type": "string",
            "enum": [
              "supports",
              "contradicts",
              "references",
              "cites",
              "derived_from",
              "duplicates",
              "updates",
              "summarizes",
              "mentions",
              "related_to"
            ],
            "default": "related_to"
          },
          "customLabel": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 80
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000
          },
          "folderId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "companyId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "required": [
          "source",
          "target"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "relationships"
  ],
  "additionalProperties": false
}

Useful next tools