{
 "captured_at": "2026-10-25T00:01:00+00:00",
 "method": "MCP initialize + tools/list via installed thegram plugin 4.0.1 stdio proxy (dist/thegram.mjs mcp)",
 "protocolVersion": "2025-11-25",
 "serverInfo": {
  "name": "thegram",
  "version": "ff13074"
 },
 "tools": [
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "List projects and mounts"
   },
   "description": "Lists the project folders and mounted collections this connection can reach as {key, id, kind, name, count, access}. A mount key such as @mounts/<id> is the prefix of every document path.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {},
    "required": [],
    "type": "object"
   },
   "name": "gram_projects",
   "title": "List projects and mounts"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "Summarize a project or document"
   },
   "description": "Summarizes one document (path) or project folder (folder): documents with rev and hash (the write preconditions), record counts by type, open records, recent revisions, and next, the time to pass as since to gram_changes later.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "folder": {
      "type": "string"
     },
     "limit": {
      "maximum": 50,
      "minimum": 1,
      "type": "integer"
     },
     "path": {
      "type": "string"
     }
    },
    "required": [],
    "type": "object"
   },
   "name": "gram_brief",
   "title": "Summarize a project or document"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "List documents and records"
   },
   "description": "Lists documents and folders (all, or under a folder path); with trash true, trashed items; with select {type, status, tag, from, to, date}, matching records as [path#id, type, title, status, date]; with a .gram path, its entity ids. revision, recorded_at or effective_at select a past state.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "cursor": {
      "type": "string"
     },
     "effective_at": {
      "type": "string"
     },
     "limit": {
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
     },
     "path": {
      "type": "string"
     },
     "recorded_at": {
      "type": "string"
     },
     "revision": {
      "minimum": 0,
      "type": "integer"
     },
     "select": {
      "additionalProperties": false,
      "properties": {
       "date": {
        "type": "string"
       },
       "from": {
        "type": "string"
       },
       "status": {
        "type": "string"
       },
       "tag": {
        "type": "string"
       },
       "to": {
        "type": "string"
       },
       "type": {
        "type": "string"
       }
      },
      "type": "object"
     },
     "trash": {
      "type": "boolean"
     }
    },
    "required": [],
    "type": "object"
   },
   "name": "gram_list",
   "title": "List documents and records"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "Read a document section"
   },
   "description": "Reads a document: without section, its outline [level, label, node id, chars] and open-comment counts; with section (a heading, node id, @preamble or @text), that section as Markdown for reading. source true returns the section's stored Markdown instead (tables, list markers, mentions and [[id]] lines intact); edit that and send it back with gram_patch section. A long section continues with cursor. revision, recorded_at or effective_at read a past state.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "cursor": {
      "type": "string"
     },
     "effective_at": {
      "type": "string"
     },
     "path": {
      "type": "string"
     },
     "recorded_at": {
      "type": "string"
     },
     "revision": {
      "minimum": 0,
      "type": "integer"
     },
     "section": {
      "type": "string"
     },
     "source": {
      "description": "true: the stored Markdown of the section (current revision only), to edit and send back with gram_patch section.",
      "type": "boolean"
     }
    },
    "required": [
     "path"
    ],
    "type": "object"
   },
   "name": "gram_read",
   "title": "Read a document section"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "Search memory records"
   },
   "description": "Searches records by relevance in documents or a folder. mode auto (default) and hybrid rank by meaning and by any matching words together, so ask in plain sentences; semantic uses meaning only; keyword needs every word in the record; exact takes one record id. Filters: type, status (an x value or open/done/closed), scope (exact s tag), from/to dates (inclusive; YYYY-MM or YYYY is a span) and date (which field). as_of searches a past state. Hits are [id, type, title, status, summary, score]; duplicates counts hits left out as repeats of an earlier one.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "as_of": {
      "additionalProperties": false,
      "properties": {
       "recorded_at": {
        "type": "string"
       },
       "revision": {
        "minimum": 0,
        "type": "integer"
       }
      },
      "type": "object"
     },
     "cursor": {
      "type": "string"
     },
     "date": {
      "type": "string"
     },
     "documents": {
      "items": {
       "type": "string"
      },
      "type": "array"
     },
     "folder": {
      "type": "string"
     },
     "from": {
      "type": "string"
     },
     "mode": {
      "description": "auto (default) and hybrid rank by meaning and by any matching words together, so ask in plain sentences; semantic uses meaning only; keyword needs every word of query in the record; exact takes one record id, not a phrase.",
      "enum": [
       "exact",
       "keyword",
       "semantic",
       "hybrid",
       "auto"
      ],
      "type": "string"
     },
     "query": {
      "type": "string"
     },
     "scope": {
      "type": "string"
     },
     "status": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "items": {
         "type": "string"
        },
        "type": "array"
       }
      ]
     },
     "to": {
      "type": "string"
     },
     "top_k": {
      "minimum": 1,
      "type": "integer"
     },
     "type": {
      "type": "string"
     }
    },
    "required": [
     "query"
    ],
    "type": "object"
   },
   "name": "gram_recall",
   "title": "Search memory records"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "Read multiple records"
   },
   "description": "Reads several records at once: for each {path, entity} in ids, the requested fields (default t d x p owner tag due at value unit source ref), links and bounded rich text. An item may select a past state with revision, recorded_at or effective_at.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "cursor": {
      "type": "string"
     },
     "fields": {
      "items": {
       "type": "string"
      },
      "type": "array"
     },
     "ids": {
      "items": {
       "properties": {
        "effective_at": {
         "type": "string"
        },
        "entity": {
         "type": "string"
        },
        "path": {
         "type": "string"
        },
        "recorded_at": {
         "type": "string"
        },
        "revision": {
         "minimum": 0,
         "type": "integer"
        }
       },
       "required": [
        "path",
        "entity"
       ],
       "type": "object"
      },
      "minItems": 1,
      "type": "array"
     }
    },
    "required": [
     "ids"
    ],
    "type": "object"
   },
   "name": "gram_context",
   "title": "Read multiple records"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "Explore record links"
   },
   "description": "Lists explicit links and REL edges from one record (from {path, entity}), optionally filtered by direction, predicates, depth and paths.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "cursor": {
      "type": "string"
     },
     "depth": {
      "maximum": 3,
      "minimum": 1,
      "type": "integer"
     },
     "direction": {
      "enum": [
       "out",
       "in",
       "both"
      ],
      "type": "string"
     },
     "from": {
      "properties": {
       "entity": {
        "type": "string"
       },
       "path": {
        "type": "string"
       }
      },
      "required": [
       "path",
       "entity"
      ],
      "type": "object"
     },
     "limit": {
      "minimum": 1,
      "type": "integer"
     },
     "paths": {
      "items": {
       "type": "string"
      },
      "type": "array"
     },
     "predicates": {
      "items": {
       "type": "string"
      },
      "type": "array"
     }
    },
    "required": [
     "from"
    ],
    "type": "object"
   },
   "name": "gram_relations",
   "title": "Explore record links"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "Read document changes"
   },
   "description": "Lists revisions after since (ISO time, exclusive) in a folder or document, or after since_revision in one document, with the records each added, changed or removed. next is the time to pass as since later; more continues the page.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "cursor": {
      "type": "string"
     },
     "folder": {
      "type": "string"
     },
     "limit": {
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
     },
     "path": {
      "type": "string"
     },
     "since": {
      "type": "string"
     },
     "since_revision": {
      "minimum": 0,
      "type": "integer"
     }
    },
    "required": [],
    "type": "object"
   },
   "name": "gram_changes",
   "title": "Read document changes"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "Read document comments"
   },
   "description": "Reads the comment threads on one Vault document (status open by default, resolved or all): each thread's anchor, section, whether the quoted text is still there, and its comments.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "path": {
      "type": "string"
     },
     "status": {
      "enum": [
       "open",
       "resolved",
       "all"
      ],
      "type": "string"
     }
    },
    "required": [
     "path"
    ],
    "type": "object"
   },
   "name": "gram_comments",
   "title": "Read document comments"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "Read and write contract"
   },
   "description": "Returns the read/write contract for a task (memory, read, create, edit or rich). topic templates returns the record vocabulary: each type's required fields and status values with their open/done/closed class; topic presentation with path returns a saved layout's data requirements.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "path": {
      "type": "string"
     },
     "task": {
      "enum": [
       "create",
       "edit",
       "rich",
       "read",
       "memory"
      ],
      "type": "string"
     },
     "topic": {
      "enum": [
       "templates",
       "presentation"
      ],
      "type": "string"
     }
    },
    "required": [],
    "type": "object"
   },
   "name": "gram_profile",
   "title": "Read and write contract"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": true,
    "title": "Inspect tool capabilities"
   },
   "description": "Returns the available tools, the response size budget, and semantic-search and index status.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {},
    "required": [],
    "type": "object"
   },
   "name": "gram_capabilities",
   "title": "Inspect tool capabilities"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": false,
    "title": "Create a document"
   },
   "description": "Creates a .gram document at path (base_revision null). content is Markdown text or {text|rich, records, fields, blocks}; a line containing only [[id]] places that record. Records need a short descriptive t title; times go in at, observed or due. For a long document, create it with the title heading and overview, then add each section with gram_patch section.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "base_revision": {
      "type": "null"
     },
     "content": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "additionalProperties": false,
        "properties": {
         "blocks": {
          "items": {
           "type": "object"
          },
          "type": "array"
         },
         "fields": {
          "additionalProperties": {
           "items": {
            "type": "string"
           },
           "type": "array"
          },
          "type": "object"
         },
         "records": {
          "items": {
           "properties": {
            "blocks": {
             "items": {
              "properties": {
               "arg": {
                "type": "string"
               },
               "kind": {
                "type": "string"
               },
               "text": {
                "type": "string"
               }
              },
              "required": [
               "kind",
               "text"
              ],
              "type": "object"
             },
             "type": "array"
            },
            "fields": {
             "additionalProperties": {
              "items": {
               "type": "string"
              },
              "type": "array"
             },
             "description": "Field key to its values, e.g. {\"t\": [\"Title\"], \"d\": [\"One-sentence outcome\"], \"x\": [\"open\"], \"due\": [\"2026-10-20\"]}.",
             "type": "object"
            },
            "id": {
             "description": "Optional; Core assigns e_<uuid> when left out.",
             "type": "string"
            },
            "links": {
             "items": {
              "anyOf": [
               {
                "properties": {
                 "predicate": {
                  "description": "Link from entity to target.",
                  "enum": [
                   "related",
                   "supports",
                   "contradicts",
                   "depends",
                   "implements",
                   "replaces",
                   "derives",
                   "blocks",
                   "enables",
                   "part-of"
                  ],
                  "type": "string"
                 },
                 "target": {
                  "description": "A record id in this document, or document-id/entity-id in another document.",
                  "type": "string"
                 }
                },
                "required": [
                 "predicate",
                 "target"
                ],
                "type": "object"
               },
               {
                "description": "[predicate, target]",
                "items": {
                 "type": "string"
                },
                "maxItems": 2,
                "minItems": 2,
                "type": "array"
               }
              ]
             },
             "type": "array"
            },
            "type": {
             "description": "Record type, e.g. task, decision, risk, event, note, metric, person, source.",
             "type": "string"
            }
           },
           "required": [
            "type"
           ],
           "type": "object"
          },
          "type": "array"
         },
         "rich": {
          "type": "object"
         },
         "text": {
          "type": "string"
         }
        },
        "type": "object"
       }
      ]
     },
     "effective_at": {
      "type": "string"
     },
     "path": {
      "type": "string"
     },
     "request_id": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string"
     },
     "title": {
      "type": "string"
     }
    },
    "required": [
     "path",
     "base_revision",
     "title"
    ],
    "type": "object"
   },
   "name": "gram_create",
   "title": "Create a document"
  },
  {
   "annotations": {
    "destructiveHint": true,
    "openWorldHint": false,
    "readOnlyHint": false,
    "title": "Patch a document"
   },
   "description": "Changes one document in one revision with operations: set or unset a field (old is the current value, null if empty), link or unlink records, add a record (place: end, none, {after} or {section}), remove a record, write a whole section with section {heading, text} (replaces it, or adds it at the end when missing), or edit the body with edit-text, text, drop-text or rich. remove and whole-body changes require base_revision and expected_hash. Growing an existing paragraph past 1,000 characters is refused.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "base_revision": {
      "minimum": 0,
      "type": "integer"
     },
     "effective_at": {
      "type": "string"
     },
     "expected_hash": {
      "minLength": 1,
      "type": "string"
     },
     "operations": {
      "items": {
       "properties": {
        "arg": {
         "description": "text and drop-text: the block argument, when the block has one.",
         "type": "string"
        },
        "changes": {
         "description": "rich: node-level changes of the body tree; gram_profile task rich lists them.",
         "items": {
          "type": "object"
         },
         "type": "array"
        },
        "entity": {
         "description": "The record id, or doc for the document itself.",
         "type": "string"
        },
        "heading": {
         "description": "section: one Markdown heading line, e.g. \"## Storage\". The section is that heading through the next heading of the same or a higher level; it is added at the end of the body when the document does not have it yet.",
         "type": "string"
        },
        "key": {
         "description": "Field key, e.g. t title, d description, x status, p priority, due, at, owner, tag.",
         "type": "string"
        },
        "kind": {
         "description": "edit-text, text and drop-text: the block kind; rich is the md body.",
         "type": "string"
        },
        "new": {
         "description": "edit-text: the text that replaces old.",
         "type": "string"
        },
        "old": {
         "anyOf": [
          {
           "type": "string"
          },
          {
           "items": {
            "type": "string"
           },
           "type": "array"
          },
          {
           "type": "null"
          }
         ],
         "description": "set and unset: the value you read, null if the field was empty. edit-text: the exact text to replace, occurring once."
        },
        "op": {
         "description": "set {entity, key, value or values, old}; unset {entity, key, old}; link and unlink {entity, predicate, target}; add {record, place?}; remove {entity}; section {heading, text}; edit-text {entity: doc, kind: rich, old, new}; text and drop-text {entity, kind, arg?, text}; rich {entity, changes}.",
         "enum": [
          "set",
          "unset",
          "link",
          "unlink",
          "add",
          "remove",
          "section",
          "edit-text",
          "text",
          "drop-text",
          "rich"
         ],
         "type": "string"
        },
        "place": {
         "anyOf": [
          {
           "enum": [
            "end",
            "none"
           ],
           "type": "string"
          },
          {
           "properties": {
            "after": {
             "type": "string"
            }
           },
           "required": [
            "after"
           ],
           "type": "object"
          },
          {
           "properties": {
            "section": {
             "type": "string"
            }
           },
           "required": [
            "section"
           ],
           "type": "object"
          }
         ],
         "description": "add: where the record appears in the body: end, none, {after: record id} or {section: heading or node id}. A record already placed in the body is not placed again."
        },
        "predicate": {
         "description": "Link from entity to target.",
         "enum": [
          "related",
          "supports",
          "contradicts",
          "depends",
          "implements",
          "replaces",
          "derives",
          "blocks",
          "enables",
          "part-of"
         ],
         "type": "string"
        },
        "record": {
         "properties": {
          "blocks": {
           "items": {
            "properties": {
             "arg": {
              "type": "string"
             },
             "kind": {
              "type": "string"
             },
             "text": {
              "type": "string"
             }
            },
            "required": [
             "kind",
             "text"
            ],
            "type": "object"
           },
           "type": "array"
          },
          "fields": {
           "additionalProperties": {
            "items": {
             "type": "string"
            },
            "type": "array"
           },
           "description": "Field key to its values, e.g. {\"t\": [\"Title\"], \"d\": [\"One-sentence outcome\"], \"x\": [\"open\"], \"due\": [\"2026-10-20\"]}.",
           "type": "object"
          },
          "id": {
           "description": "Optional; Core assigns e_<uuid> when left out.",
           "type": "string"
          },
          "links": {
           "items": {
            "anyOf": [
             {
              "properties": {
               "predicate": {
                "description": "Link from entity to target.",
                "enum": [
                 "related",
                 "supports",
                 "contradicts",
                 "depends",
                 "implements",
                 "replaces",
                 "derives",
                 "blocks",
                 "enables",
                 "part-of"
                ],
                "type": "string"
               },
               "target": {
                "description": "A record id in this document, or document-id/entity-id in another document.",
                "type": "string"
               }
              },
              "required": [
               "predicate",
               "target"
              ],
              "type": "object"
             },
             {
              "description": "[predicate, target]",
              "items": {
               "type": "string"
              },
              "maxItems": 2,
              "minItems": 2,
              "type": "array"
             }
            ]
           },
           "type": "array"
          },
          "type": {
           "description": "Record type, e.g. task, decision, risk, event, note, metric, person, source.",
           "type": "string"
          }
         },
         "required": [
          "type"
         ],
         "type": "object"
        },
        "target": {
         "description": "A record id in this document, or document-id/entity-id in another document.",
         "type": "string"
        },
        "text": {
         "description": "section: the Markdown under the heading, replacing what was there. text: the new block text (the whole md body when kind is rich).",
         "type": "string"
        },
        "value": {
         "description": "set: the one single-line value.",
         "type": "string"
        },
        "values": {
         "description": "set: every value of a repeated field, in order (instead of value).",
         "items": {
          "type": "string"
         },
         "minItems": 1,
         "type": "array"
        }
       },
       "required": [
        "op"
       ],
       "type": "object"
      },
      "minItems": 1,
      "type": "array"
     },
     "path": {
      "type": "string"
     },
     "presentation_digest": {
      "description": "Optional uiRequirements.digest from gram_profile topic presentation. Requires base_revision and expected_hash; rejects stale presentation profiles atomically.",
      "type": "string"
     },
     "request_id": {
      "description": "Stable per intended change; reuse only to retry the same change.",
      "maxLength": 128,
      "minLength": 1,
      "type": "string"
     }
    },
    "required": [
     "path",
     "request_id",
     "operations"
    ],
    "type": "object"
   },
   "name": "gram_patch",
   "title": "Patch a document"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": false,
    "title": "Write a document comment"
   },
   "description": "Writes a comment on a Vault document without changing the document: action open starts a thread on quoted text (block narrows where) or on a record, reply answers a thread, and resolve or reopen changes a thread's status.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "action": {
      "enum": [
       "open",
       "reply",
       "resolve",
       "reopen"
      ],
      "type": "string"
     },
     "block": {
      "type": "string"
     },
     "path": {
      "type": "string"
     },
     "quote": {
      "maxLength": 2000,
      "minLength": 1,
      "type": "string"
     },
     "record": {
      "type": "string"
     },
     "request_id": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string"
     },
     "text": {
      "maxLength": 4000,
      "minLength": 1,
      "type": "string"
     },
     "thread": {
      "type": "string"
     }
    },
    "required": [
     "path",
     "action"
    ],
    "type": "object"
   },
   "name": "gram_comment",
   "title": "Write a document comment"
  },
  {
   "annotations": {
    "destructiveHint": true,
    "openWorldHint": false,
    "readOnlyHint": false,
    "title": "Move or rename"
   },
   "description": "Moves or renames a document or folder with its contents within the same mount, from path to to. Missing destination folders are created; a document keeps its history and records.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "path": {
      "type": "string"
     },
     "to": {
      "type": "string"
     }
    },
    "required": [
     "path",
     "to"
    ],
    "type": "object"
   },
   "name": "gram_move",
   "title": "Move or rename"
  },
  {
   "annotations": {
    "destructiveHint": true,
    "openWorldHint": false,
    "readOnlyHint": false,
    "title": "Move to trash"
   },
   "description": "Moves a document or folder with its contents to the mount's trash, from which gram_restore can bring it back.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "path": {
      "type": "string"
     }
    },
    "required": [
     "path"
    ],
    "type": "object"
   },
   "name": "gram_delete",
   "title": "Move to trash"
  },
  {
   "annotations": {
    "destructiveHint": false,
    "openWorldHint": false,
    "readOnlyHint": false,
    "title": "Restore from trash"
   },
   "description": "Restores a trashed document or folder to its original path, or to the mount root when that folder is gone; a name clash gets a (1) suffix. path is the original path, or the mount key with id from the trash listing.",
   "inputSchema": {
    "additionalProperties": false,
    "properties": {
     "id": {
      "type": "string"
     },
     "path": {
      "type": "string"
     }
    },
    "required": [
     "path"
    ],
    "type": "object"
   },
   "name": "gram_restore",
   "title": "Restore from trash"
  }
 ]
}