Skip to main content
Glama
Auto Ontology MCP

Auto Ontology MCP

Update or delete knowledge records by ID

edit_records
DestructiveIdempotent

Update specific fields or permanently delete knowledge entity records by integer ID. Find row IDs via run_sql or get_source; deletion needs confirmation and fails if referenced.

Instructions

Update specific fields or permanently delete existing knowledge entity records by integer id. Use after locating row ids with run_sql or get_source; use add_records to insert or upsert new rows and define_entity to alter columns or drop the whole entity. action='update' modifies only the supplied columns and provenance fields; action='delete' is permanent, requires user confirmation, and fails if other records reference any target row.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "entity": "<entity>",
      "action": "<action>",
      "ids": "<ids>"
    },
    "name": "edit_records"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesInteger record ids to modify (find them with run_sql or get_source).
actionYesOperation to perform on the specified record ids: 'update' fields or 'delete' permanently.
entityYesKnowledge entity (Term) name whose records to modify, e.g. 'Receipt'.
sourceNoWhere this came from: an existing source id, or a new source to register (deduplicated by uri or title).
valuesNoFor action='update': column values to set; may include _locator, _evidence, and _note.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.6.2
    • changedInput schema / properties / action / description
      Previous value: -"What to do with the records."New value: +"Operation to perform on the specified record ids: 'update' fields or 'delete' permanently."
    • changedInput schema / properties / entity / description
      Previous value: -"Entity name."New value: +"Knowledge entity (Term) name whose records to modify, e.g. 'Receipt'."
    • changedInput schema / properties / ids / description
      Previous value: -"Record ids (find them with run_sql or describe_table)."New value: +"Integer record ids to modify (find them with run_sql or get_source)."
    • changedInput schema / properties / source / anyOf
      Previous value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "properties": {
      -      "author": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "content": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Transcribed text or the relevant excerpt."
      -      },
      -      "id": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Existing source id; omit to register a new source."
      -      },
      -      "kind": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "pdf, image, web, note, conversation, email, book, ..."
      -      },
      -      "published_on": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "YYYY-MM-DD"
      -      },
      -      "summary": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "What the source is about, in a sentence or two."
      -      },
      -      "title": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "File name, page title or a short label, e.g. 'IMG_2041.jpg'."
      -      },
      -      "uri": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Path or URL of the original, when known."
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "properties": {
      +      "author": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Author, organization, or speaker who created the source."
      +      },
      +      "content": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "A short excerpt; save longer parts as passages and keep the full text as the original."
      +      },
      +      "id": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Existing source id; omit to register a new source."
      +      },
      +      "kind": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Source format such as pdf, image, web, note, conversation, email, or book."
      +      },
      +      "original": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Path of the original that is already in the Obsidian vault, relative to the vault, e.g. 'Clippings/Article.md'."
      +      },
      +      "original_file": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Absolute path of a local file (PDF, image, document) to copy into the vault as the original; changed files are copied beside the old one."
      +      },
      +      "original_text": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Full markdown text saved as a new note in the vault's originals folder; passing updated text creates a new note and keeps the old one."
      +      },
      +      "published_on": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Publication or capture date in YYYY-MM-DD format."
      +      },
      +      "summary": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "What the source is about, in a sentence or two."
      +      },
      +      "title": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "File name, page title or a short label, e.g. 'IMG_2041.jpg'."
      +      },
      +      "uri": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Path or URL of the original, when known."
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / values / description
      Previous value: -"For update: column values to set; may include _locator, _evidence, _note."New value: +"For action='update': column values to set; may include _locator, _evidence, and _note."
  2. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is partly covered, but the description adds real behavior: update touches only the supplied columns plus provenance fields, delete is permanent, needs user confirmation, and fails when other records reference a target row. The remaining gap is that it never says what happens to the optional source payload during an update or delete.

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?

Three sentences, front-loaded with purpose, then routing, then per-action semantics. No filler, and the long final sentence is dense with decision-relevant facts (permanence, confirmation, referential failure) rather than padding.

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 five-parameter mutation tool with an output schema already covering return values, the description is nearly complete: it explains both actions, the id-discovery precondition, and failure modes. The only omission is how the source parameter behaves when action is 'update' versus 'delete'.

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 coverage is 100%, so all five parameters, including the nested source object and the action enum, are already documented in the schema. The description reinforces 'integer id' and clarifies that values sets only the supplied columns and may carry provenance fields, but that is a modest increment over the schema rather than new semantics, so the baseline 3 applies.

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 states two specific verbs (update, permanently delete) against a specific resource (knowledge entity records by integer id), and explicitly separates itself from add_records (insert/upsert) and define_entity (alter columns / drop entity). An agent can route correctly without opening any sibling schema.

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?

It gives an explicit precondition ('Use after locating row ids with run_sql or get_source') and names the alternatives for adjacent jobs: add_records for new rows, define_entity for column changes or dropping the entity. It also states a per-action prerequisite, that delete requires user confirmation, which is guidance an agent must act on before calling.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.