{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"block.append","title":"Append a block","description":"Appends `markdown` as a new block at the end of the section at a heading path or line, or at the end of the note without one.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"heading":{"description":"The heading's path from the top, each element a heading's plain text, for example [\"Plan\", \"Risks\"]; or give line.","items":{"type":"string"},"type":"array"},"line":{"description":"The heading's line, from 1, instead of heading.","type":"integer"},"markdown":{"description":"The Markdown to add as a block of its own.","type":"string"},"section":{"description":"The section's id from outline.read (\"section:3\"), instead of heading or line: it names the same section after a rename or a move, for as long as the note stays open.","type":"string"}},"required":["markdown"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/block.append","markdown":"https://developer.kition.ai/docs/kits/note/commands/block.append.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"block.read","title":"Read a block","description":"Answers the Markdown of the block carrying the block id `blockId` (`^id`), with its range and first line.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"blockId":{"description":"The block id, without the caret (^).","type":"string"},"unit":{"default":"scalar","description":"How positions are counted: Unicode characters (scalar, the default), or UTF-16 code units as the editor counts them.","enum":["scalar","utf16"],"type":"string"}},"required":["blockId"],"type":"object"},"result":{"additionalProperties":false,"properties":{"from":{"description":"Where it starts, in the request's unit.","type":"integer"},"line":{"description":"Its first line, from 1.","type":"integer"},"markdown":{"description":"The Markdown, as the file has it.","type":"string"},"to":{"description":"Where it ends (exclusive).","type":"integer"}},"required":["from","line","markdown","to"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/block.read","markdown":"https://developer.kition.ai/docs/kits/note/commands/block.read.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"block.replace","title":"Replace a block","description":"Replaces the block carrying the block id `blockId` with `markdown`, keeping its `^id` unless `markdown` sets one.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"blockId":{"description":"The block id, without the caret (^).","type":"string"},"markdown":{"description":"The block's new Markdown; its ^id is kept unless this sets one.","type":"string"}},"required":["blockId","markdown"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/block.replace","markdown":"https://developer.kition.ai/docs/kits/note/commands/block.replace.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"block.setId","title":"Set a block id","description":"Gives a block a block id (`^id`) so links and `block.*` commands can reach it: the block ending on `line`, or the one already carrying `blockId` (renaming its id).","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"blockId":{"description":"The block's current id, instead of line.","type":"string"},"id":{"description":"The new id: letters, digits and hyphens, without the caret.","type":"string"},"line":{"description":"The block's last line, from 1.","type":"integer"},"occurrence":{"description":"Which of the blocks with that id, from 1.","type":"integer"}},"required":["id"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/block.setId","markdown":"https://developer.kition.ai/docs/kits/note/commands/block.setId.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"comment.add","title":"Add a comment","description":"Starts a comment thread anchored to a text range (`from`/`to`), the `occurrence`-th match of `quote`, a heading, or the whole note without an anchor, and answers the thread's and the comment's ids. Comments are kept beside the note, never written into the file.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"author":{"description":"The caller's own principal id (the default); the editor's person passes theirs, and another is refused.","type":"string"},"body":{"description":"The comment's text.","type":"string"},"created":{"description":"When, ISO 8601 UTC; now by default.","type":"string"},"from":{"description":"Where the commented range starts.","type":"integer"},"heading":{"description":"Or a heading's path: comments on the heading.","items":{"type":"string"},"type":"array"},"line":{"description":"Or the heading's line, from 1.","type":"integer"},"name":{"description":"The author's display name.","type":"string"},"occurrence":{"description":"Which occurrence of quote, from 1.","type":"integer"},"quote":{"description":"Or the text to comment on; its first occurrence unless occurrence is given.","type":"string"},"to":{"description":"Where it ends (exclusive).","type":"integer"},"unit":{"default":"scalar","description":"How positions are counted: Unicode characters (scalar, the default), or UTF-16 code units as the editor counts them.","enum":["scalar","utf16"],"type":"string"}},"required":["body"],"type":"object"},"result":{"additionalProperties":false,"properties":{"comment":{"description":"The new comment's id.","type":"string"},"thread":{"description":"The thread's id.","type":"string"}},"required":["comment","thread"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/comment.add","markdown":"https://developer.kition.ai/docs/kits/note/commands/comment.add.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"comment.reply","title":"Reply to a comment","description":"Adds a reply to the comment thread `thread` and answers the new comment's id.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"author":{"description":"The caller's own principal id (the default); the editor's person passes theirs, and another is refused.","type":"string"},"body":{"description":"The reply's text.","type":"string"},"created":{"description":"When, ISO 8601 UTC; now by default.","type":"string"},"name":{"description":"The author's display name.","type":"string"},"thread":{"description":"The thread's id.","type":"string","x-khp-types":["CommentThread"]}},"required":["body","thread"],"type":"object"},"result":{"additionalProperties":false,"properties":{"comment":{"description":"The new comment's id.","type":"string"},"thread":{"description":"The thread's id.","type":"string"}},"required":["comment","thread"],"type":"object"},"targets":{"param":"thread","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/note/commands/comment.reply","markdown":"https://developer.kition.ai/docs/kits/note/commands/comment.reply.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"comment.resolve","title":"Resolve a comment thread","description":"Marks the comment thread `thread` resolved, or open again with `resolved: false`.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"resolved":{"default":true,"description":"Resolved, or open again.","type":"boolean"},"thread":{"description":"The thread's id.","type":"string","x-khp-types":["CommentThread"]}},"required":["thread"],"type":"object"},"result":{"additionalProperties":false,"properties":{"thread":{"description":"The thread's id.","type":"string"}},"required":["thread"],"type":"object"},"targets":{"param":"thread","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/note/commands/comment.resolve","markdown":"https://developer.kition.ai/docs/kits/note/commands/comment.resolve.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"comment.threads","title":"List comment threads","description":"Lists the comment threads with their comments, resolved state, and the text each is anchored to with where it is now (or that it is gone). Use it to get the thread ids the other comment commands take.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"unit":{"default":"scalar","description":"How positions are counted: Unicode characters (scalar, the default), or UTF-16 code units as the editor counts them.","enum":["scalar","utf16"],"type":"string"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"threads":{"description":"The note's comment threads; one without quote is on the whole note.","items":{"additionalProperties":false,"properties":{"comments":{"description":"Its comments in order; the first opened it.","items":{"additionalProperties":false,"properties":{"author":{"description":"The author's principal id.","type":"string"},"body":{"description":"The comment's text.","type":"string"},"created":{"description":"When, ISO 8601 UTC.","type":"string"},"id":{"description":"The comment's id.","type":"string"},"name":{"description":"The author's display name, or null.","oneOf":[{"type":"string"},{"type":"null"}]}},"required":["author","body","created","id","name"],"type":"object"},"type":"array"},"from":{"description":"Where that text is now (Unicode characters, or the request's unit).","type":"integer"},"gone":{"description":"True when the text it was anchored to is no longer in the note.","type":"boolean"},"id":{"description":"The thread's id: what comment.reply and comment.resolve take.","type":"string"},"line":{"description":"Its line, from 1.","type":"integer"},"quote":{"description":"The text it is anchored to.","type":"string"},"resolved":{"description":"Resolved.","type":"boolean"},"to":{"description":"Where it ends (exclusive).","type":"integer"}},"required":["comments","id","resolved"],"type":"object"},"type":"array"}},"required":["threads"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/comment.threads","markdown":"https://developer.kition.ai/docs/kits/note/commands/comment.threads.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"edit.redo","title":"Redo","description":"Applies again the edit the caller's last undo took back, in the same scope as `edit.undo`; answers whether there was one.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"scope":{"description":"Whose last undone step to redo: the person's or the agent's. By default the scope of whoever runs it.","enum":["person","agent"],"type":"string"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"damage":{"additionalProperties":false,"description":"What the step made stale on screen.","properties":{"kind":{"description":"Nothing, the whole view, or the rectangles in rects.","enum":["none","full","rects"],"type":"string"},"rects":{"description":"With kind rects: the areas to draw again, in document pixels.","items":{"description":"[x0, y0, x1, y1]","items":{"type":"integer"},"type":"array"},"type":"array"}},"required":["kind"],"type":"object"},"done":{"description":"Whether there was a step to take; false changes nothing.","type":"boolean"}},"required":["damage","done"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/edit.redo","markdown":"https://developer.kition.ai/docs/kits/note/commands/edit.redo.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"edit.undo","title":"Undo","description":"Takes back the caller's last edit (the person's or, with `scope: \"agent\"`, the agent's) without touching the other's edits; answers whether there was one.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"scope":{"description":"Whose last step to undo: the person's or the agent's. By default the scope of whoever runs it (an agent undoes only its own steps).","enum":["person","agent"],"type":"string"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"damage":{"additionalProperties":false,"description":"What the step made stale on screen.","properties":{"kind":{"description":"Nothing, the whole view, or the rectangles in rects.","enum":["none","full","rects"],"type":"string"},"rects":{"description":"With kind rects: the areas to draw again, in document pixels.","items":{"description":"[x0, y0, x1, y1]","items":{"type":"integer"},"type":"array"},"type":"array"}},"required":["kind"],"type":"object"},"done":{"description":"Whether there was a step to take; false changes nothing.","type":"boolean"}},"required":["damage","done"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/edit.undo","markdown":"https://developer.kition.ai/docs/kits/note/commands/edit.undo.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"file.export","title":"Export","description":"Writes the note as a standalone HTML file (the reading view with its stylesheet; `standalone: false` only the `<main>` element) or prints it to a PDF on `letter` or `a4` pages, and answers the file as base64 `data` with its size, a file name and, for a PDF, its page count and what the pages could not draw. Does not change the note.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"format":{"description":"The file's format.","enum":["html","pdf"],"type":"string"},"pageSize":{"default":"letter","description":"PDF: the page size.","enum":["letter","a4"],"type":"string"},"standalone":{"default":true,"description":"HTML: a whole file with its stylesheet; false writes the <main> element only.","type":"boolean"}},"required":["format"],"type":"object"},"result":{"additionalProperties":false,"properties":{"bytes":{"description":"Its size in bytes.","type":"integer"},"data":{"description":"The file's bytes, base64.","type":"string"},"format":{"description":"The format written.","enum":["html","pdf"],"type":"string"},"mime":{"description":"Its media type.","enum":["text/html","application/pdf"],"type":"string"},"name":{"description":"A file name for it: the note's, ending in .html or .pdf.","type":"string"},"pages":{"description":"A PDF's page count.","type":"integer"},"unsupported":{"additionalProperties":false,"description":"What the pages could not draw as the editor shows it.","properties":{"embeds":{"description":"Embeds drawn as labelled boxes.","type":"integer"},"html":{"description":"HTML blocks drawn as their source.","type":"integer"},"images":{"description":"Images drawn as labelled boxes.","type":"integer"},"math":{"description":"Math drawn as its source.","type":"integer"},"mermaid":{"description":"Mermaid diagrams drawn as their source.","type":"integer"},"missingGlyphs":{"description":"Characters drawn as boxes: no page font has them.","type":"integer"},"missingSample":{"description":"Up to 24 of those characters, in order of first use.","type":"string"}},"required":["embeds","html","images","math","mermaid","missingGlyphs","missingSample"],"type":"object"}},"required":["bytes","data","format","mime","name"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/file.export","markdown":"https://developer.kition.ai/docs/kits/note/commands/file.export.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"file.setLineEndings","title":"Set the line endings","description":"Sets the file's line endings to LF or CRLF and whether it starts with a byte order mark; the text is otherwise unchanged. Answers the line style the file has now.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"bom":{"description":"Write a UTF-8 byte order mark; unchanged by default.","type":"boolean"},"eol":{"description":"LF or CRLF for every line.","enum":["lf","crlf"],"type":"string"}},"required":["eol"],"type":"object"},"result":{"additionalProperties":false,"properties":{"bom":{"description":"Whether the file starts with a byte order mark.","type":"boolean"},"changed":{"description":"Whether the file changed.","type":"boolean"},"eol":{"description":"The line endings the file has now.","enum":["lf","crlf"],"type":"string"}},"required":["bom","changed","eol"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/file.setLineEndings","markdown":"https://developer.kition.ai/docs/kits/note/commands/file.setLineEndings.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"heading.setLevel","title":"Set a heading's level","description":"Sets the level (1 to 6) of the heading at a path or line by rewriting only its `#` run (an underlined heading's underline); its subsections keep their own levels.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"heading":{"description":"The heading's path from the top, each element a heading's plain text, for example [\"Plan\", \"Risks\"]; or give line.","items":{"type":"string"},"type":"array"},"level":{"description":"The new level, 1 to 6.","maximum":6,"minimum":1,"type":"integer"},"line":{"description":"The heading's line, from 1, instead of heading.","type":"integer"},"section":{"description":"The section's id from outline.read (\"section:3\"), instead of heading or line: it names the same section after a rename or a move, for as long as the note stays open.","type":"string"},"style":{"description":"Rewrite an underlined heading as a # heading.","enum":["atx"],"type":"string"}},"required":["level"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/heading.setLevel","markdown":"https://developer.kition.ai/docs/kits/note/commands/heading.setLevel.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"link.insert","title":"Insert a link","description":"Inserts a link to `destination` at a text position, as a wikilink or a Markdown link, with optional display text, or as an embed with `embed: true`.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"at":{"description":"Where to insert.","type":"integer"},"destination":{"description":"What the link points at, as the note writes it: Plan, Plan#Risks, docs/plan.md.","type":"string"},"embed":{"description":"Embed it (![[...]]) instead of linking.","type":"boolean"},"style":{"default":"wikilink","description":"[[wikilink]] or [text](markdown).","enum":["wikilink","markdown"],"type":"string"},"text":{"description":"The text shown (a wikilink's alias).","type":"string"},"unit":{"default":"scalar","description":"How positions are counted: Unicode characters (scalar, the default), or UTF-16 code units as the editor counts them.","enum":["scalar","utf16"],"type":"string"}},"required":["at","destination"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/link.insert","markdown":"https://developer.kition.ai/docs/kits/note/commands/link.insert.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"link.update","title":"Change a link","description":"Changes the destination (and the text, when given) of the `index`-th link on `line`, as `links.list` numbers them; nothing else of the link changes.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"destination":{"description":"The new destination.","type":"string"},"index":{"description":"Which link of the line, from 0.","type":"integer"},"line":{"description":"The link's line, from 1.","type":"integer"},"text":{"description":"The new text shown.","type":"string"}},"required":["destination","index","line"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/link.update","markdown":"https://developer.kition.ai/docs/kits/note/commands/link.update.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"links.list","title":"List links, tags and block ids","description":"Lists the note's wikilinks, Markdown links, embeds, images, URLs, tags and block ids with their line and, for links, whether the target exists; `kinds` limits the list.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"kinds":{"description":"Only these kinds; all by default.","items":{"enum":["wikilink","markdown","embed","image","url","tag","blockId"],"type":"string"},"type":"array"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"links":{"description":"Links in document order, then tags, then block ids.","items":{"oneOf":[{"additionalProperties":false,"properties":{"anchor":{"description":"The part after the file: #heading or #^block.","type":"string"},"destination":{"description":"The destination as written.","type":"string"},"index":{"description":"Which link of the line, from 0: what link.update takes.","type":"integer"},"kind":{"description":"The link's kind; markdown includes reference links and <autolinks>.","enum":["wikilink","markdown","embed","image","url"],"type":"string"},"line":{"description":"Its line, from 1.","type":"integer"},"state":{"description":"Whether its target exists: a file the host has, a heading or block of this note, a web address, or unknown when the host cannot say.","enum":["resolved","missing","missing-anchor","external","unknown"],"type":"string"},"text":{"description":"The text shown (a wikilink's alias).","type":"string"}},"required":["destination","index","kind","line","state"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"description":"A tag.","enum":["tag"],"type":"string"},"line":{"description":"Its line, from 1.","type":"integer"},"name":{"description":"The tag without #.","type":"string"},"property":{"description":"True when it is written in the tags property.","type":"boolean"}},"required":["kind","line","name"],"type":"object"},{"additionalProperties":false,"properties":{"id":{"description":"The id without the caret.","type":"string"},"kind":{"description":"A block id.","enum":["blockId"],"type":"string"},"line":{"description":"Its line, from 1.","type":"integer"}},"required":["id","kind","line"],"type":"object"}]},"type":"array"}},"required":["links"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/links.list","markdown":"https://developer.kition.ai/docs/kits/note/commands/links.list.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"note.write","title":"Write the whole note","description":"Replaces the whole note with `markdown` as one undo step, rewriting only the lines that differ. Use it to write a new note; prefer section, block and text commands to change part of one.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"markdown":{"description":"The note's whole new Markdown; only the lines that differ are changed.","type":"string"}},"required":["markdown"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/note.write","markdown":"https://developer.kition.ai/docs/kits/note/commands/note.write.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"outline.read","title":"Read the outline","description":"Lists the headings with their level, line (from 1), heading path, section range and word count, a page at a time (`limit`, then `cursor` from `next`). Use it to find the path or line that section commands take.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"cursor":{"description":"Where the previous page ended (its next value).","type":"string"},"limit":{"description":"The most headings to answer (default 200, at most 1000).","type":"integer"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"headings":{"description":"This page's headings, in document order.","items":{"additionalProperties":false,"properties":{"from":{"description":"Where its section starts (Unicode characters).","type":"integer"},"level":{"description":"1 to 6.","type":"integer"},"line":{"description":"The heading's line, from 1.","type":"integer"},"path":{"description":"The heading's path: the plain texts of the headings above it and its own.","items":{"type":"string"},"type":"array"},"to":{"description":"Where its section ends, subsections included (exclusive).","type":"integer"},"words":{"description":"The words under it, subsections included.","type":"integer"}},"required":["from","level","line","path","to","words"],"type":"object"},"type":"array"},"next":{"description":"The cursor of the next page; absent on the last page.","type":"string"},"total":{"description":"How many headings the note has.","type":"integer"}},"required":["headings","total"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/outline.read","markdown":"https://developer.kition.ai/docs/kits/note/commands/outline.read.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"page.layout","title":"Read the page layout","description":"Answers how the note prints on `letter` or `a4` pages: the page count, where each block lands (page, x, y, width, height in points), blocks too wide for the column, and what the pages cannot draw. Use it to check page breaks before exporting a PDF.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"page":{"description":"Only the blocks placed on this page, from 1.","type":"integer"},"pageSize":{"default":"letter","description":"The page size.","enum":["letter","a4"],"type":"string"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"blocks":{"description":"Where each block (or the given page's blocks) lands, at most 500.","items":{"additionalProperties":false,"properties":{"height":{"description":"Points.","type":"number"},"kind":{"description":"What the block is, for example paragraph, heading, list, quote, code, table, math or rule.","type":"string"},"line":{"description":"The block's first line, from 1.","type":"integer"},"page":{"description":"The page, from 1.","type":"integer"},"width":{"description":"Points.","type":"number"},"x":{"description":"Its left edge on the page, in points.","type":"number"},"y":{"description":"Its top edge on the page, in points.","type":"number"}},"required":["height","kind","line","page","width","x","y"],"type":"object"},"type":"array"},"overflow":{"description":"Blocks wider than the page's column: a code line wrapped, a table squeezed.","items":{"additionalProperties":false,"properties":{"kind":{"description":"code or table.","type":"string"},"line":{"description":"The block's first line, from 1.","type":"integer"},"page":{"description":"The page, from 1.","type":"integer"},"width":{"description":"The width it needs, in points.","type":"number"}},"required":["kind","line","page","width"],"type":"object"},"type":"array"},"pageSize":{"additionalProperties":false,"description":"The page size in points.","properties":{"height":{"description":"Points.","type":"number"},"width":{"description":"Points.","type":"number"}},"required":["height","width"],"type":"object"},"pages":{"description":"How many pages the note prints on.","type":"integer"},"unsupported":{"additionalProperties":false,"description":"What the pages could not draw as the editor shows it.","properties":{"embeds":{"description":"Embeds drawn as labelled boxes.","type":"integer"},"html":{"description":"HTML blocks drawn as their source.","type":"integer"},"images":{"description":"Images drawn as labelled boxes.","type":"integer"},"math":{"description":"Math drawn as its source.","type":"integer"},"mermaid":{"description":"Mermaid diagrams drawn as their source.","type":"integer"},"missingGlyphs":{"description":"Characters drawn as boxes: no page font has them.","type":"integer"},"missingSample":{"description":"Up to 24 of those characters, in order of first use.","type":"string"}},"required":["embeds","html","images","math","mermaid","missingGlyphs","missingSample"],"type":"object"}},"required":["blocks","overflow","pageSize","pages","unsupported"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/page.layout","markdown":"https://developer.kition.ai/docs/kits/note/commands/page.layout.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"projection.read","title":"List the note's objects and their ids","description":"Lists the note's sections, tasks, tables, properties and links with the ids this session gives them (`section:3`, `task:2`), their label and first line, in document order by kind; `kinds` limits the list. Section commands take a section's id as `section`, `task.toggle` a task's as `task`, and receipts and `others` name what changed by these ids. An id follows its object through edits (a section renamed or moved keeps it) while the note stays open; it is never written into the file.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"kinds":{"description":"Only these kinds; all by default.","items":{"enum":["section","task","table","property","link"],"type":"string"},"type":"array"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"objects":{"description":"The objects, sections first, each kind in document order.","items":{"additionalProperties":false,"properties":{"done":{"description":"Whether a task is checked.","type":"boolean"},"id":{"description":"The object's id this session: section:3, task:2, table:1, property:1, link:4.","type":"string"},"kind":{"description":"Its kind.","enum":["section","task","table","property","link"],"type":"string"},"label":{"description":"How it reads: a heading path joined by ›, a task's text, a table's header cells, a property key, a link's destination.","type":"string"},"line":{"description":"Its first line, from 1.","type":"integer"},"path":{"description":"A section's heading path.","items":{"type":"string"},"type":"array"}},"required":["id","kind","label","line"],"type":"object"},"type":"array"}},"required":["objects"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/projection.read","markdown":"https://developer.kition.ai/docs/kits/note/commands/projection.read.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"property.delete","title":"Delete a property","description":"Deletes the front-matter property `key` and its lines; `occurrence` picks one when the key is written more than once.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"key":{"description":"A top-level property key.","type":"string"},"occurrence":{"description":"Which of a key written twice, from 1.","type":"integer"}},"required":["key"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/property.delete","markdown":"https://developer.kition.ai/docs/kits/note/commands/property.delete.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"property.list","title":"List the properties","description":"Lists the front-matter properties with key, value, type, writing style and lines, and reports duplicated keys and YAML it cannot read. Use it before `property.set`, `property.delete` or `property.rename`.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"description":"{}","properties":{},"type":"object"},"result":{"additionalProperties":false,"properties":{"duplicates":{"description":"Keys written more than once.","items":{"type":"string"},"type":"array"},"invalid":{"additionalProperties":false,"properties":{"line":{"description":"The line, from 1.","type":"integer"},"message":{"description":"What is wrong.","type":"string"}},"required":["line","message"],"type":"object"},"properties":{"description":"The front matter's top-level properties, in order; empty without front matter.","items":{"additionalProperties":false,"properties":{"complex":{"description":"Why it is complex, when it is.","type":"string"},"key":{"description":"The key.","type":"string"},"lines":{"description":"Its first and last line, from 1.","items":{"type":"integer"},"type":"array"},"style":{"description":"How it is written; property.set keeps the style. A complex one is only replaced whole.","enum":["empty","plain","single-quoted","double-quoted","flow-list","block-list","complex"],"type":"string"},"type":{"description":"What the value reads as; other is YAML the note does not type, unknown a value it could not read.","enum":["string","number","boolean","null","date","datetime","list","other","unknown"],"type":"string"},"value":{"description":"The value: a string (dates too), number, boolean, list of strings, or null."}},"required":["key","lines","style","type","value"],"type":"object"},"type":"array"}},"required":["properties"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/property.list","markdown":"https://developer.kition.ai/docs/kits/note/commands/property.list.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"property.rename","title":"Rename a property","description":"Renames the front-matter property `key` to `to`, changing only the key and keeping its value and place.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"key":{"description":"The property's key now.","type":"string"},"to":{"description":"The new key.","type":"string"}},"required":["key","to"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/property.rename","markdown":"https://developer.kition.ai/docs/kits/note/commands/property.rename.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"property.set","title":"Set a property","description":"Sets a front-matter property to a string, number, boolean, null or list of strings in the key's own writing style, adding the property (and the front matter) when it is missing.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"key":{"description":"A top-level property key.","type":"string"},"value":{"description":"A string, number, boolean, null, or a list of strings."}},"required":["key","value"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/property.set","markdown":"https://developer.kition.ai/docs/kits/note/commands/property.set.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"section.delete","title":"Delete a section","description":"Deletes the section at a heading path or line: its heading and everything under it, subsections included.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"heading":{"description":"The heading's path from the top, each element a heading's plain text, for example [\"Plan\", \"Risks\"]; or give line.","items":{"type":"string"},"type":"array"},"line":{"description":"The heading's line, from 1, instead of heading.","type":"integer"},"section":{"description":"The section's id from outline.read (\"section:3\"), instead of heading or line: it names the same section after a rename or a move, for as long as the note stays open.","type":"string"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/section.delete","markdown":"https://developer.kition.ai/docs/kits/note/commands/section.delete.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"section.insert","title":"Insert into a section","description":"Inserts `markdown` as a new block before the heading, after the section and its subsections, right under the heading (`start`), or at the end of the section's own text before its subsections (`end`).","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"heading":{"description":"The heading's path from the top, each element a heading's plain text, for example [\"Plan\", \"Risks\"]; or give line.","items":{"type":"string"},"type":"array"},"line":{"description":"The heading's line, from 1, instead of heading.","type":"integer"},"markdown":{"description":"The Markdown to insert.","type":"string"},"position":{"description":"Before the heading, after the section, or inside it at its start or end.","enum":["before","after","start","end"],"type":"string"},"section":{"description":"The section's id from outline.read (\"section:3\"), instead of heading or line: it names the same section after a rename or a move, for as long as the note stays open.","type":"string"}},"required":["markdown","position"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/section.insert","markdown":"https://developer.kition.ai/docs/kits/note/commands/section.insert.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"section.move","title":"Move a section","description":"Moves the section at a heading path or line, with its subsections, before, after, or into the start or end of another section (`toHeading` or `toLine`); a section cannot move into itself.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"heading":{"description":"The heading's path from the top, each element a heading's plain text, for example [\"Plan\", \"Risks\"]; or give line.","items":{"type":"string"},"type":"array"},"line":{"description":"The heading's line, from 1, instead of heading.","type":"integer"},"position":{"description":"Where, relative to that heading's section.","enum":["before","after","start","end"],"type":"string"},"section":{"description":"The section's id from outline.read (\"section:3\"), instead of heading or line: it names the same section after a rename or a move, for as long as the note stays open.","type":"string"},"toHeading":{"description":"The heading to move it next to, by path.","items":{"type":"string"},"type":"array"},"toLine":{"description":"The heading to move it next to, by line, instead of toHeading.","type":"integer"},"toSection":{"description":"The section to move it next to, by its id from outline.read, instead of toHeading or toLine.","type":"string"}},"required":["position"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/section.move","markdown":"https://developer.kition.ai/docs/kits/note/commands/section.move.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"section.read","title":"Read a section","description":"Answers the Markdown of one section (the heading and everything under it), picked by heading path or line, with its range and first line; `withHeading: false` leaves the heading line out.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"heading":{"description":"The heading's path from the top, each element a heading's plain text, for example [\"Plan\", \"Risks\"]; or give line.","items":{"type":"string"},"type":"array"},"line":{"description":"The heading's line, from 1, instead of heading.","type":"integer"},"section":{"description":"The section's id from outline.read (\"section:3\"), instead of heading or line: it names the same section after a rename or a move, for as long as the note stays open.","type":"string"},"unit":{"default":"scalar","description":"How positions are counted: Unicode characters (scalar, the default), or UTF-16 code units as the editor counts them.","enum":["scalar","utf16"],"type":"string"},"withHeading":{"default":true,"description":"Include the heading line.","type":"boolean"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"from":{"description":"Where it starts, in the request's unit.","type":"integer"},"line":{"description":"Its first line, from 1.","type":"integer"},"markdown":{"description":"The Markdown, as the file has it.","type":"string"},"to":{"description":"Where it ends (exclusive).","type":"integer"}},"required":["from","line","markdown","to"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/section.read","markdown":"https://developer.kition.ai/docs/kits/note/commands/section.read.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"section.replace","title":"Replace a section","description":"Replaces the body of the section at a heading path or line (subsections included) with `markdown`, keeping its heading unless `withHeading: true` (then `markdown` includes the heading).","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"heading":{"description":"The heading's path from the top, each element a heading's plain text, for example [\"Plan\", \"Risks\"]; or give line.","items":{"type":"string"},"type":"array"},"line":{"description":"The heading's line, from 1, instead of heading.","type":"integer"},"markdown":{"description":"The section's new Markdown.","type":"string"},"section":{"description":"The section's id from outline.read (\"section:3\"), instead of heading or line: it names the same section after a rename or a move, for as long as the note stays open.","type":"string"},"withHeading":{"default":false,"description":"Replace the heading line too.","type":"boolean"}},"required":["markdown"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/section.replace","markdown":"https://developer.kition.ai/docs/kits/note/commands/section.replace.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.align","title":"Align a table column","description":"Sets a column's alignment (left, center, right or none) by rewriting only its cell of the delimiter row.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"align":{"description":"The alignment.","enum":["left","center","right","none"],"type":"string"},"column":{"description":"The column, from 0.","type":"integer"},"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"}},"required":["align","column","table"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.align","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.align.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.create","title":"Insert a table","description":"Inserts a new table of `columns` columns (with optional header cells and `rows` empty body rows) before a line, at a section position, or at the end of the note, and answers its table index.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"columns":{"description":"How many columns.","maximum":64,"minimum":1,"type":"integer"},"header":{"description":"The header cells.","items":{"type":"string"},"type":"array"},"heading":{"description":"Or a heading's path, with position.","items":{"type":"string"},"type":"array"},"line":{"description":"Insert before this line, from 1.","type":"integer"},"position":{"description":"Where, relative to the heading's section; end by default.","enum":["before","after","start","end"],"type":"string"},"rows":{"description":"How many empty body rows (default 1).","type":"integer"}},"required":["columns"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed.","type":"boolean"},"table":{"description":"The new table's index, from 0.","type":"integer"}},"required":["changed","table"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.create","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.create.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.deleteColumn","title":"Delete a table column","description":"Deletes column `column` (from 0) from every row of a table, header included.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"column":{"description":"The column, from 0.","type":"integer"},"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"}},"required":["column","table"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.deleteColumn","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.deleteColumn.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.deleteRow","title":"Delete a table row","description":"Deletes body row `row` (from 1) from a table; the header row cannot be deleted.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"row":{"description":"The body row, from 1.","type":"integer"},"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"}},"required":["row","table"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.deleteRow","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.deleteRow.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.format","title":"Format a table","description":"Rewrites a table with padded cells so its columns line up in the Markdown source, keeping every cell's text.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"}},"required":["table"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.format","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.format.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.insertColumn","title":"Insert a table column","description":"Inserts a column at `at` (from 0; one past the last appends) with an optional header and alignment; every row gets an empty cell there.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"align":{"description":"The new column's alignment.","enum":["left","center","right","none"],"type":"string"},"at":{"description":"Where the new column goes, from 0; one past the last appends.","type":"integer"},"header":{"description":"The new column's header.","type":"string"},"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"}},"required":["at","table"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.insertColumn","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.insertColumn.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.insertRow","title":"Insert a table row","description":"Inserts a body row before body row `at` (1 is the first; one past the last appends) with optional `cells`.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"at":{"description":"Where the new row goes: 1 before the first body row; one past the last appends.","type":"integer"},"cells":{"description":"The new row's cells.","items":{"type":"string"},"type":"array"},"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"}},"required":["at","table"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.insertRow","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.insertRow.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.moveColumn","title":"Move a table column","description":"Moves column `from` to position `to` within a table (from 0), header and alignment included.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"from":{"description":"The column to move, from 0.","type":"integer"},"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"},"to":{"description":"Where it ends up, from 0.","type":"integer"}},"required":["from","table","to"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.moveColumn","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.moveColumn.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.moveRow","title":"Move a table row","description":"Moves body row `from` to position `to` within a table (body rows count from 1).","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"from":{"description":"The body row to move, from 1.","type":"integer"},"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"},"to":{"description":"Where it ends up, from 1.","type":"integer"}},"required":["from","table","to"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.moveRow","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.moveRow.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.read","title":"Read a table","description":"Answers one table (`table`, from 0) as its header, body rows, column alignment and lines; without `table` it answers how many tables the note has and where each is.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"}},"type":"object"},"result":{"description":"Without table: how many tables there are and where; with table: that table.","oneOf":[{"additionalProperties":false,"properties":{"list":{"description":"Each table.","items":{"additionalProperties":false,"properties":{"columns":{"description":"Its columns (the header's cells).","type":"integer"},"line":{"description":"Its first line, from 1.","type":"integer"},"rows":{"description":"Its rows, the header row included.","type":"integer"},"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"}},"required":["columns","line","rows","table"],"type":"object"},"type":"array"},"tables":{"description":"How many tables the note has.","type":"integer"}},"required":["list","tables"],"type":"object"},{"additionalProperties":false,"properties":{"align":{"description":"Each column's alignment.","items":{"description":"A column's alignment.","enum":["left","center","right","none"],"type":"string"},"type":"array"},"header":{"description":"The header cells' text.","items":{"type":"string"},"type":"array"},"lines":{"description":"Its first and last line, from 1.","items":{"type":"integer"},"type":"array"},"rows":{"description":"The body rows, top to bottom (row 1 first).","items":{"description":"A body row's cells.","items":{"type":"string"},"type":"array"},"type":"array"},"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"}},"required":["align","header","lines","rows","table"],"type":"object"}]},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.read","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.read.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"table.setCell","title":"Set a table cell","description":"Sets one cell's text: `table` and `column` count from 0, `row` 0 is the header and body rows count from 1. Pass `expected` with the current text so a stale cell fails.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"column":{"description":"The column, from 0.","type":"integer"},"expected":{"description":"The cell's text now; the command is refused when it differs.","type":"string"},"row":{"description":"The row, 0 for the header row.","type":"integer"},"table":{"description":"The table's index in the note, from 0 (document order).","type":"integer"},"text":{"description":"The cell's new text (inline Markdown, one line).","type":"string"}},"required":["column","row","table","text"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed (false when it already read so).","type":"boolean"}},"required":["changed"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/table.setCell","markdown":"https://developer.kition.ai/docs/kits/note/commands/table.setCell.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"task.toggle","title":"Check or uncheck a task","description":"Checks or unchecks the task at `line` (from 1) or carrying `blockId`; `done` sets it, otherwise it flips. Answers whether it is checked now. Get lines from `tasks.list`.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"blockId":{"description":"The task's block id, instead of line.","type":"string"},"done":{"description":"Checked or not; flips it by default.","type":"boolean"},"line":{"description":"The task's line, from 1.","type":"integer"},"task":{"description":"The task's id from tasks.list (\"task:2\"), instead of line or blockId.","type":"string"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed.","type":"boolean"},"done":{"description":"Whether the task is checked now.","type":"boolean"}},"required":["changed","done"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/task.toggle","markdown":"https://developer.kition.ai/docs/kits/note/commands/task.toggle.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"tasks.list","title":"List tasks","description":"Lists the task items (`- [ ]`, `- [x]`) with line, text, done and block id, in the whole note or one section. Use it to get the line `task.toggle` takes.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"heading":{"description":"The heading's path from the top, each element a heading's plain text, for example [\"Plan\", \"Risks\"]; or give line.","items":{"type":"string"},"type":"array"},"line":{"description":"The heading's line, from 1, instead of heading.","type":"integer"},"section":{"description":"The section's id from outline.read (\"section:3\"), instead of heading or line: it names the same section after a rename or a move, for as long as the note stays open.","type":"string"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"tasks":{"description":"The tasks, in document order.","items":{"additionalProperties":false,"properties":{"blockId":{"description":"Its block id, or null.","oneOf":[{"type":"string"},{"type":"null"}]},"done":{"description":"Checked.","type":"boolean"},"line":{"description":"The task's line, from 1: what task.toggle takes.","type":"integer"},"text":{"description":"Its text, without the box and block id.","type":"string"}},"required":["blockId","done","line","text"],"type":"object"},"type":"array"}},"required":["tasks"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/tasks.list","markdown":"https://developer.kition.ai/docs/kits/note/commands/tasks.list.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"template.expand","title":"Expand a template","description":"Answers `markdown` with the template variables (`{{title}}`, `{{date}}`, `{{time}}`, `{{date:FORMAT}}`) filled in, without changing the note; pass the result to `note.write` or `section.insert`.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"date":{"description":"The date and time to use, ISO 8601 (2026-10-23 or 2026-10-23T14:05); now by default.","type":"string"},"markdown":{"description":"Template text with {{title}}, {{date}}, {{time}} and {{date:FORMAT}} (YYYY, MM, DD, HH, mm, ss).","type":"string"},"title":{"description":"What {{title}} becomes.","type":"string"}},"required":["markdown"],"type":"object"},"result":{"additionalProperties":false,"properties":{"markdown":{"description":"The template with its variables filled in.","type":"string"}},"required":["markdown"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/template.expand","markdown":"https://developer.kition.ai/docs/kits/note/commands/template.expand.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"text.delete","title":"Delete text","description":"Deletes the text between `from` and `to` and answers the note's new length; pass `expected` (the text you mean to delete) so a stale position fails instead of deleting the wrong text.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"expected":{"description":"The text there now; the command is refused when it differs.","type":"string"},"from":{"description":"Where the range starts.","type":"integer"},"to":{"description":"Where the range ends (exclusive).","type":"integer"},"unit":{"default":"scalar","description":"How positions are counted: Unicode characters (scalar, the default), or UTF-16 code units as the editor counts them.","enum":["scalar","utf16"],"type":"string"}},"required":["from","to"],"type":"object"},"result":{"additionalProperties":false,"properties":{"length":{"description":"The note's length after the edit, in the request's unit.","type":"integer"}},"required":["length"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/text.delete","markdown":"https://developer.kition.ai/docs/kits/note/commands/text.delete.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"text.find","title":"Find text","description":"Finds text (or a regular expression with `regex: true`) in the note's body (the front matter is not searched: read properties with `property.list`) and answers each match's `from`, `to`, line and text. The way to get text positions for `text.insert`, `text.replace` and `comment.add`.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"caseSensitive":{"default":true,"description":"Match case.","type":"boolean"},"find":{"description":"The text, or a regular expression with regex.","type":"string"},"limit":{"description":"The most matches to answer (default 100).","type":"integer"},"regex":{"description":"Read find as a regular expression (Rust syntax).","type":"boolean"},"unit":{"default":"scalar","description":"How positions are counted: Unicode characters (scalar, the default), or UTF-16 code units as the editor counts them.","enum":["scalar","utf16"],"type":"string"}},"required":["find"],"type":"object"},"result":{"additionalProperties":false,"properties":{"count":{"description":"How many matches are answered.","type":"integer"},"matches":{"description":"The matches, in document order.","items":{"additionalProperties":false,"properties":{"from":{"description":"Where it starts, in the request's unit.","type":"integer"},"line":{"description":"Its line, from 1.","type":"integer"},"text":{"description":"The text matched.","type":"string"},"to":{"description":"Where it ends (exclusive).","type":"integer"}},"required":["from","line","text","to"],"type":"object"},"type":"array"},"more":{"description":"Whether there are more than limit.","type":"boolean"}},"required":["count","matches","more"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/text.find","markdown":"https://developer.kition.ai/docs/kits/note/commands/text.find.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"text.findReplace","title":"Find and replace","description":"Replaces matches of `find` in the note's body with `replace` (matches in the front matter are not counted: change properties with `property.set`): the first by default, the n-th with `occurrence`, or every one with `occurrence: \"all\"`; `regex` and `caseSensitive` as in `text.find`. Answers how many were replaced.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"caseSensitive":{"default":true,"description":"Match case.","type":"boolean"},"find":{"description":"The text, or a regular expression with regex.","type":"string"},"occurrence":{"description":"Which match to replace: a number from 1, or \"all\"; 1 by default."},"regex":{"description":"Read find as a regular expression (Rust syntax).","type":"boolean"},"replace":{"description":"The replacement; with regex, $1 names a group.","type":"string"}},"required":["find","replace"],"type":"object"},"result":{"additionalProperties":false,"properties":{"changed":{"description":"Whether the note's text changed.","type":"boolean"},"replaced":{"description":"How many matches were replaced.","type":"integer"}},"required":["changed","replaced"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/text.findReplace","markdown":"https://developer.kition.ai/docs/kits/note/commands/text.findReplace.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"text.insert","title":"Insert text","description":"Inserts `text` at a text position (from 0) and answers the note's new length. Get positions from `text.find`; inserting at 0 puts text above the front matter.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"at":{"description":"Where to insert.","type":"integer"},"expected":{"description":"What the empty range at `at` holds: \"\"; any other text fails the insert.","type":"string"},"text":{"description":"The Markdown to insert.","type":"string"},"unit":{"default":"scalar","description":"How positions are counted: Unicode characters (scalar, the default), or UTF-16 code units as the editor counts them.","enum":["scalar","utf16"],"type":"string"}},"required":["at","text"],"type":"object"},"result":{"additionalProperties":false,"properties":{"length":{"description":"The note's length after the edit, in the request's unit.","type":"integer"}},"required":["length"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/text.insert","markdown":"https://developer.kition.ai/docs/kits/note/commands/text.insert.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"text.read","title":"Read the text","description":"Answers the note's raw Markdown (front matter included) and its length, or only the part between `from` and `to` (text positions from 0). Use it to read exact text before editing by position.","mutates":false,"tool":"note_run","params":{"additionalProperties":false,"properties":{"from":{"description":"Where to start; 0 by default.","type":"integer"},"to":{"description":"Where to stop (exclusive); the end by default.","type":"integer"},"unit":{"default":"scalar","description":"How positions are counted: Unicode characters (scalar, the default), or UTF-16 code units as the editor counts them.","enum":["scalar","utf16"],"type":"string"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"length":{"description":"The whole note's length, in the request's unit.","type":"integer"},"text":{"description":"The text between from and to (the whole note by default), front matter included.","type":"string"}},"required":["length","text"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/text.read","markdown":"https://developer.kition.ai/docs/kits/note/commands/text.read.md"}
{"kit":"note","kit_name":"Note","kit_version":"0.3.0","id":"text.replace","title":"Replace text","description":"Replaces the text between `from` and `to` with `text` and answers the note's new length; pass `expected` with the current text so a stale range fails.","mutates":true,"tool":"note_run","params":{"additionalProperties":false,"properties":{"expected":{"description":"The text there now; the command is refused when it differs.","type":"string"},"from":{"description":"Where the range starts.","type":"integer"},"text":{"description":"The Markdown to put there.","type":"string"},"to":{"description":"Where the range ends (exclusive).","type":"integer"},"unit":{"default":"scalar","description":"How positions are counted: Unicode characters (scalar, the default), or UTF-16 code units as the editor counts them.","enum":["scalar","utf16"],"type":"string"}},"required":["from","text","to"],"type":"object"},"result":{"additionalProperties":false,"properties":{"length":{"description":"The note's length after the edit, in the request's unit.","type":"integer"}},"required":["length"],"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/note/commands/text.replace","markdown":"https://developer.kition.ai/docs/kits/note/commands/text.replace.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"edit.redo","title":"Redo","description":"Puts back the last undone step of one scope (by default the caller's own).","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"scope":{"description":"Whose step: the person's or the agent's. By default the scope of whoever runs it (an agent undoes only its own steps).","enum":["person","agent"],"type":"string"}},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Whether a step was taken back (or put back).","properties":{"change":{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},"done":{"description":"False when there was no step.","type":"boolean"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/edit.redo","markdown":"https://developer.kition.ai/docs/kits/table/commands/edit.redo.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"edit.undo","title":"Undo","description":"Takes back the last step of one scope, the person's or the agent's (by default the caller's own); the other scope's later steps stay.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"scope":{"description":"Whose step: the person's or the agent's. By default the scope of whoever runs it (an agent undoes only its own steps).","enum":["person","agent"],"type":"string"}},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Whether a step was taken back (or put back).","properties":{"change":{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},"done":{"description":"False when there was no step.","type":"boolean"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/edit.undo","markdown":"https://developer.kition.ai/docs/kits/table/commands/edit.undo.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.ai.apply","title":"Write an AI field's results","description":"Writes what the host's model generated (text, images or errors per record) into an AI field.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"action":{"description":"The AI action (summarize, translate, extract, improve, customize, classify, text_generation, image_generation, image_customization); when given, it must be the field's own.","type":"string"},"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"config":{"additionalProperties":true,"description":"Overrides of the field's AI configuration for this run.","type":"object"},"fieldId":{"description":"The AI field's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Field"]},"recordId":{"description":"One record to run on.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Record"]},"results":{"description":"What the host generated, one entry per record.","items":{"additionalProperties":true,"properties":{"error":{"description":"Why generation failed for this record.","type":"string"},"image":{"description":"A generated image."},"images":{"items":{},"type":"array"},"recordId":{"oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Record"]},"text":{"type":"string"}},"required":["recordId"],"type":"object"},"type":"array"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId","fieldId","results"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What was written: one record's `record`, `field` and `state`, or a batch's `items` and counts.","properties":{"accepted":{"description":"Results taken (a batch).","type":"integer"},"completed":{"description":"Records written.","type":"integer"},"errors":{"items":{"additionalProperties":true,"description":"A result that failed.","properties":{"message":{"description":"Why.","type":"string"},"record_id":{"description":"The record's id.","type":"integer"}},"type":"object"},"type":"array"},"failed":{"description":"Results that failed.","type":"integer"},"field":{"additionalProperties":true,"description":"A field (column).","properties":{"ai_prompt":{"description":"A legacy AI prompt.","type":"string"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"formula":{"description":"A formula field's expression.","type":"string"},"id":{"description":"The field's local projection address (fieldId).","type":"integer"},"is_primary":{"description":"It names the record.","type":"boolean"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the field.","type":"object"},"name":{"description":"The key of its values in a record's `values`.","type":"string"},"options":{"additionalProperties":true,"description":"The settings its type reads (choices, target_table_id, …).","type":"object"},"order":{"description":"Its position among the table's fields, from 1.","type":"integer"},"readonly":{"description":"Values are not written by hand (formula and AI fields).","type":"boolean"},"required":{"description":"A record needs a value.","type":"boolean"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The title people see.","type":"string"},"tool_id":{"description":"The stable UUID accepted by fieldId and used by receipts and conflicts.","type":"string"},"type":{"description":"The field type.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"},"unique":{"description":"Values must differ between records.","type":"boolean"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"items":{"items":{"additionalProperties":true,"description":"A record written.","properties":{"record":{"additionalProperties":true,"description":"A record (row).","properties":{"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The record's local projection address (recordId).","type":"integer"},"order":{"description":"Its position in the table, from 1.","type":"integer"},"row_key":{"description":"The record's stable key, used by links, bulk commands and transact.","type":"string"},"table_id":{"description":"The table's id.","type":"integer"},"tool_id":{"description":"The stable UUID accepted by recordId and used by receipts and conflicts.","type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"},"values":{"additionalProperties":true,"description":"Its values, keyed by field name; a missing key is an empty value.","type":"object"}},"type":"object"},"state":{"additionalProperties":true,"description":"The AI cell's run state.","properties":{"config_hash":{"description":"A hash of the field's AI configuration.","type":"string"},"error":{"description":"Empty, or why it failed.","type":"string"},"model_id":{"description":"Always 0.","type":"integer"},"source_hash":{"description":"A hash of what the model read.","type":"string"},"status":{"description":"done.","type":"string"},"updated_at":{"description":"When it was written, in Unix milliseconds.","type":"integer"}},"type":"object"}},"type":"object"},"type":"array"},"limit":{"description":"The most records one batch takes.","type":"integer"},"record":{"additionalProperties":true,"description":"A record (row).","properties":{"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The record's local projection address (recordId).","type":"integer"},"order":{"description":"Its position in the table, from 1.","type":"integer"},"row_key":{"description":"The record's stable key, used by links, bulk commands and transact.","type":"string"},"table_id":{"description":"The table's id.","type":"integer"},"tool_id":{"description":"The stable UUID accepted by recordId and used by receipts and conflicts.","type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"},"values":{"additionalProperties":true,"description":"Its values, keyed by field name; a missing key is an empty value.","type":"object"}},"type":"object"},"state":{"additionalProperties":true,"description":"The AI cell's run state.","properties":{"config_hash":{"description":"A hash of the field's AI configuration.","type":"string"},"error":{"description":"Empty, or why it failed.","type":"string"},"model_id":{"description":"Always 0.","type":"integer"},"source_hash":{"description":"A hash of what the model read.","type":"string"},"status":{"description":"done.","type":"string"},"updated_at":{"description":"When it was written, in Unix milliseconds.","type":"integer"}},"type":"object"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.ai.apply","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.ai.apply.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.ai.prepare","title":"Prepare an AI field run","description":"Builds the prompts an AI field's run needs for one record or several, for the host to send to a model; changes nothing.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"action":{"description":"The AI action (summarize, translate, extract, improve, customize, classify, text_generation, image_generation, image_customization); when given, it must be the field's own.","type":"string"},"config":{"additionalProperties":true,"description":"Overrides of the field's AI configuration for this run.","type":"object"},"fieldId":{"description":"The AI field's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Field"]},"limit":{"description":"How many records to prepare at most.","type":"integer"},"recordId":{"description":"One record to run on.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Record"]},"record_ids":{"description":"The records to run on, instead of recordId.","items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array","x-khp-types":["Record"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId","fieldId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The model requests of the run, for the host to generate and answer with table.ai.apply.","properties":{"fieldId":{"description":"The AI field's id.","type":"integer"},"model":{"description":"The model the field asks for, when it names one.","type":"string"},"output":{"description":"What the model makes.","enum":["text","image"],"type":"string"},"requests":{"items":{"additionalProperties":true,"description":"One record's request.","properties":{"messages":{"items":{"additionalProperties":true,"description":"A message to the model.","properties":{"parts":{"items":{"additionalProperties":true,"description":"A part: {type: text, text} or {type: image, mime, hash?, url?}.","type":"object"},"type":"array"},"role":{"description":"user.","type":"string"}},"type":"object"},"type":"array"},"options":{"additionalProperties":true,"description":"An image request's count, size, width, height, quality and useCase.","type":"object"},"recordId":{"description":"The record's id.","type":"integer"}},"type":"object"},"type":"array"},"skipped":{"items":{"additionalProperties":true,"description":"A record left out of a batch.","properties":{"reason":{"description":"Why.","type":"string"},"recordId":{"description":"The record's id.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.ai.prepare","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.ai.prepare.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.attachments.put","title":"Store an attachment","description":"Stores a file's bytes (base64) in the document; answers the attachment value (url, name, type, size) to put in an attachment field's list.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"data":{"default":"","description":"The file's bytes, standard base64.","type":"string"},"mimeType":{"default":"","type":"string"},"name":{"default":"","type":"string"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The attachment value: put it in the list an attachment field's value holds.","properties":{"mimeType":{"description":"The file's media type.","type":"string"},"name":{"description":"The file's name.","type":"string"},"sha256":{"description":"The bytes' SHA-256.","type":"string"},"sizeBytes":{"description":"The file's size in bytes.","type":"integer"},"url":{"description":"kition-blob: and the bytes' SHA-256.","type":"string"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.attachments.put","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.attachments.put.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.attachments.read","title":"Read an attachment","description":"Reads an attachment's bytes (base64), name and type by its blob hash.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"hash":{"description":"The blob's SHA-256, as an attachment's url names it after kition-blob:.","type":"string"}},"required":["hash"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The attachment with its bytes.","properties":{"data":{"description":"The bytes, base64.","type":"string"},"hash":{"description":"The bytes' SHA-256.","type":"string"},"mimeType":{"description":"The file's media type.","type":"string"},"name":{"description":"The file's name.","type":"string"},"sizeBytes":{"description":"The file's size in bytes.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.attachments.read","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.attachments.read.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.changes.since","title":"List the records changed since a version","description":"Reads the records created, updated and deleted since a version, with who made each change.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"version":{"description":"Base64 of a version a previous answer gave; empty for every change.","type":"string"}},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The records written since the version.","properties":{"created":{"items":{"additionalProperties":true,"description":"One record a write touched.","properties":{"fieldIds":{"items":{"description":"A field whose value changed (updates only).","type":"integer"},"type":"array"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordId":{"description":"The record's id.","type":"integer"},"tableId":{"description":"The table's id.","type":"integer"}},"type":"object"},"type":"array"},"deleted":{"items":{"additionalProperties":true,"description":"One record a write touched.","properties":{"fieldIds":{"items":{"description":"A field whose value changed (updates only).","type":"integer"},"type":"array"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordId":{"description":"The record's id.","type":"integer"},"tableId":{"description":"The table's id.","type":"integer"}},"type":"object"},"type":"array"},"updated":{"items":{"additionalProperties":true,"description":"One record a write touched.","properties":{"fieldIds":{"items":{"description":"A field whose value changed (updates only).","type":"integer"},"type":"array"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordId":{"description":"The record's id.","type":"integer"},"tableId":{"description":"The table's id.","type":"integer"}},"type":"object"},"type":"array"},"version":{"description":"The current version, base64: the next call's `version`.","type":"string"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.changes.since","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.changes.since.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.csv.export","title":"Export a table as CSV text","description":"Answers a table as CSV text with a file name, without changing anything.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The table as CSV.","properties":{"content":{"description":"The CSV text.","type":"string"},"name":{"description":"A file name, the table's title.","type":"string"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.csv.export","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.csv.export.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.csv.import","title":"Import CSV text into a table","description":"Adds one record per row of CSV text to an existing table; the header row names fields by title or name, and other columns are left out.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"content":{"type":"string"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What was added.","properties":{"created":{"description":"How many records were created.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.csv.import","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.csv.import.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.dashboards.delete","title":"Delete a dashboard","description":"Deletes a dashboard; tables are not affected.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"dashboardId":{"description":"The dashboard's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Dashboard"]}},"required":["dashboardId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Done.","properties":{"deleted":{"description":"Always true.","type":"boolean"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.dashboards.delete","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.dashboards.delete.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.dashboards.list","title":"List dashboards","description":"Lists the dashboards with their ids, titles, layout and widgets.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"description":"the params of the data-document route GET /dashboards: its ids (tableId, …), query values, and body fields","properties":{},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Every dashboard.","properties":{"items":{"items":{"additionalProperties":true,"description":"A dashboard.","properties":{"id":{"description":"The dashboard's id.","type":"string"},"layout":{"items":{"description":"A widget's position."},"type":"array"},"order":{"description":"Its position among the dashboards.","type":"number"},"source_table_id":{"description":"The table its widgets read by default, or null."},"title":{"description":"The dashboard's title.","type":"string"},"widgets":{"items":{"additionalProperties":true,"description":"A widget (chart, number, list), with its own id.","type":"object"},"type":"array"}},"type":"object"},"type":"array"},"total":{"description":"How many there are.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.dashboards.list","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.dashboards.list.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.dashboards.upsert","title":"Create or replace a dashboard","description":"Creates or replaces a dashboard by its id: its title, source table, layout and widgets (charts, numbers, lists over tables).","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"dashboardId":{"description":"The dashboard's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Dashboard"]},"layout":{"description":"The widgets' positions.","items":{},"type":"array"},"order":{"type":"number"},"source_table_id":{"oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"title":{"type":"string"},"widgets":{"description":"The widgets, each an object with its own `id`.","items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["dashboardId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A dashboard.","properties":{"id":{"description":"The dashboard's id.","type":"string"},"layout":{"items":{"description":"A widget's position."},"type":"array"},"order":{"description":"Its position among the dashboards.","type":"number"},"source_table_id":{"description":"The table its widgets read by default, or null."},"title":{"description":"The dashboard's title.","type":"string"},"widgets":{"items":{"additionalProperties":true,"description":"A widget (chart, number, list), with its own id.","type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.dashboards.upsert","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.dashboards.upsert.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.documents.get","title":"Read the document","description":"Reads the document's title, every table with its fields and views, and its dashboards' ids and titles, without changing anything.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"description":"the params of the data-document route GET /data-documents/{documentId}: its ids (tableId, …), query values, and body fields","properties":{},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The document with its tables and dashboards.","properties":{"color":{"description":"Always empty.","type":"string"},"created_at":{"description":"When the file was created, in Unix milliseconds.","type":"integer"},"dashboards":{"items":{"additionalProperties":true,"description":"A dashboard's summary.","properties":{"id":{"description":"The dashboard's id.","type":"string"},"order":{"description":"Its position.","type":"number"},"title":{"description":"Its title.","type":"string"}},"type":"object"},"type":"array"},"description":{"description":"Always empty.","type":"string"},"icon":{"description":"Always empty.","type":"string"},"id":{"description":"Always 1.","type":"integer"},"meta":{"description":"Always null."},"path":{"description":"The document's name as the host opened it.","type":"string"},"tables":{"items":{"additionalProperties":true,"description":"A table with its fields and views.","properties":{"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"description":{"description":"The table's description.","type":"string"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"fields":{"items":{"additionalProperties":true,"description":"A field (column).","properties":{"ai_prompt":{"description":"A legacy AI prompt.","type":"string"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"formula":{"description":"A formula field's expression.","type":"string"},"id":{"description":"The field's local projection address (fieldId).","type":"integer"},"is_primary":{"description":"It names the record.","type":"boolean"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the field.","type":"object"},"name":{"description":"The key of its values in a record's `values`.","type":"string"},"options":{"additionalProperties":true,"description":"The settings its type reads (choices, target_table_id, …).","type":"object"},"order":{"description":"Its position among the table's fields, from 1.","type":"integer"},"readonly":{"description":"Values are not written by hand (formula and AI fields).","type":"boolean"},"required":{"description":"A record needs a value.","type":"boolean"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The title people see.","type":"string"},"tool_id":{"description":"The stable UUID accepted by fieldId and used by receipts and conflicts.","type":"string"},"type":{"description":"The field type.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"},"unique":{"description":"Values must differ between records.","type":"boolean"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"type":"array"},"id":{"description":"The table's local projection address (tableId).","type":"integer"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the table.","type":"object"},"name":{"description":"The table's internal name.","type":"string"},"order":{"description":"Its position among the tables, from 1.","type":"integer"},"primary_field_id":{"description":"The id of the field that names a record.","oneOf":[{"description":"The id of the field that names a record.","type":"integer"},{"type":"null"}]},"title":{"description":"The table's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by tableId and used by receipts and conflicts.","type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"},"views":{"items":{"additionalProperties":true,"description":"A view of a table.","properties":{"config":{"additionalProperties":true,"description":"Its filters, sorts, groups and display settings.","type":"object"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The view's local projection address (viewId).","type":"integer"},"locked":{"description":"The view is locked against changes in the editor.","type":"boolean"},"order":{"description":"Its position among the table's views, from 1.","type":"integer"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The view's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by viewId and used by receipts and conflicts.","type":"string"},"type":{"description":"The view type.","enum":["grid","kanban","calendar","gallery"],"type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"title":{"description":"The document's title, else its name without .ktable.","type":"string"},"tool_id":{"description":"The document's stable Base UUID, used by queries, batches and receipts.","type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0.","type":"integer"},"workspace_root":{"description":"Always empty.","type":"string"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.documents.get","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.documents.get.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.fields.create","title":"Create a field","description":"Adds a field (column) to a table: its title, its type (text, number, single_select, date, link_to_record, formula, ai, ...) and the options that type reads; answers the field with its id and name.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"ai_prompt":{"type":"string"},"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"formula":{"type":"string"},"is_primary":{"type":"boolean"},"meta":{},"name":{"description":"The field's internal name, the key of its values when a field: lowercase ASCII letters, digits and `_`, starting with a letter and not ending with `_` (`^[a-z](?:[a-z0-9_]*[a-z0-9])?$`), unique among the table's fields. An explicit name is kept as given; one not in that form, or already taken (also by an earlier field of the same call), is refused with invalid_params. Without one it is derived from the title: letters and digits kept and lowercased, every other run of characters made one `_`, `_` trimmed, `f_` put before a leading digit, `field` when nothing is left (a title in Chinese, say, for a table too), then `_2`, `_3`, ... when taken.","type":"string"},"options":{"additionalProperties":true,"description":"Settings of the field's type: only the keys its type reads matter, and other keys are kept as they are.","properties":{"action":{"description":"button: what it does, {\"kind\": \"open_url\", \"url\"} or {\"kind\": \"run_workflow\", \"workflow_id\"}."},"aggregation":{"description":"rollup: how the linked values combine.","enum":["count","sum","avg","max","min","and","or","concat"],"type":"string"},"ai_config":{"additionalProperties":true,"description":"ai (and text, long_text or attachment fields the host's model fills): what the model does, checked when the field runs. Also summary_instruction, extract_instruction or schema, improve_instruction, max_words, enabled, and image settings.","properties":{"categories":{"description":"classify: two or more categories.","items":{"type":"string"},"type":"array"},"prompt":{"description":"The instruction of customize, text_generation and image_customization.","type":"string"},"source_field_id":{"description":"The field it reads; not needed by customize, text_generation and image_customization.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"target_language":{"description":"translate: the language to write.","type":"string"},"type":{"description":"The action.","enum":["summarize","translate","extract","improve","customize","classify","text_generation","image_generation","image_customization"],"type":"string"}},"type":"object"},"allow_multiple":{"description":"link_to_record: false allows one linked record per cell; default true.","type":"boolean"},"choices":{"description":"single_select, multi_select: the values to choose from, in order, for example [\"Lead\", \"Customer\"].","items":{"type":"string"},"type":"array"},"date_format":{"description":"date, datetime: how the editor shows the value; the stored value does not change.","enum":["year_month_day_slash","year_month_day_time_slash","year_month_day_time_zone_slash","year_month_day_dash","year_month_day_time_dash","year_month_day_time_zone_dash","month_day_dash","month_day_year_slash","day_month_year_slash"],"type":"string"},"icon":{"description":"rating: the symbol shown; default star.","enum":["star","heart","thumbs"],"type":"string"},"label":{"description":"button: the button's text; default the field's title.","type":"string"},"link_field_id":{"description":"lookup, rollup: the link_to_record field of this table to follow.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"max":{"description":"rating: the highest rating, 1 to 10; default 5.","type":"integer"},"multi_value_mode":{"description":"lookup: list answers the values as a list (default), concat as one string.","enum":["list","concat"],"type":"string"},"showAs":{"description":"long_text: show the value as plain text or as rendered markdown.","enum":["text","markdown"],"type":"string"},"symmetric_field_id":{"description":"link_to_record: the link field of the target table that links back, if any.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"target_field_id":{"description":"lookup, rollup: the field of the linked records to read; a rollup without it aggregates the linked records themselves (count).","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"target_table_id":{"description":"link_to_record: the id of the table whose records it links to.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Table"]}},"type":"object"},"order":{"type":"integer"},"readonly":{"type":"boolean"},"required":{"type":"boolean"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"title":{"type":"string"},"type":{"description":"The field's type (default text). There is no email or phone type: use text, or url for a link to open.\ntext: One line of text (a string).\nlong_text: Text of several lines (a string); options.showAs shows it as text or rendered markdown.\nnumber: A number.\ndate: A calendar date written as YYYY-MM-DD; options.date_format is how the editor shows it.\ndatetime: A date and time as an ISO 8601 string; options.date_format is how the editor shows it.\nsingle_select: One of options.choices (a string).\nmulti_select: Some of options.choices (a list of strings).\ncheckbox: true or false.\nurl: A web address (a string).\nattachment: Files kept in the document: a list of the values table.attachments.put answers.\ndocument_link: A reference to another document (a string).\nformula: Computed from the field's `formula` expression, which names fields in braces ({price} * 2); read-only.\nai: Written by the host's model as options.ai_config says (table.ai.prepare, then table.ai.apply); read-only.\nrating: A whole number from 0 to options.max (default 5).\nuser: A person, {id, name, avatar?}, or a list of them.\nlink_to_record: Links to records of the table options.target_table_id names; set with table.links.replace, read as [{row_key, display}].\nlookup: Computed: the values of options.target_field_id in the records linked through options.link_field_id.\nrollup: Computed: options.aggregation over the records linked through options.link_field_id (their options.target_field_id values).\nbutton: A button labelled options.label that runs options.action; it holds no value.\ncreated_time: Reserved for when the record was created; this engine leaves it empty.\nlast_modified_time: Reserved for when the record last changed; this engine leaves it empty.\ncreated_by: Reserved for who created the record; this engine leaves it empty.\nlast_modified_by: Reserved for who last changed the record; this engine leaves it empty.\nauto_number: Reserved for a running number; this engine leaves it empty.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A field (column).","properties":{"ai_prompt":{"description":"A legacy AI prompt.","type":"string"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"formula":{"description":"A formula field's expression.","type":"string"},"id":{"description":"The field's local projection address (fieldId).","type":"integer"},"is_primary":{"description":"It names the record.","type":"boolean"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the field.","type":"object"},"name":{"description":"The key of its values in a record's `values`.","type":"string"},"options":{"additionalProperties":true,"description":"The settings its type reads (choices, target_table_id, …).","type":"object"},"order":{"description":"Its position among the table's fields, from 1.","type":"integer"},"readonly":{"description":"Values are not written by hand (formula and AI fields).","type":"boolean"},"required":{"description":"A record needs a value.","type":"boolean"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The title people see.","type":"string"},"tool_id":{"description":"The stable UUID accepted by fieldId and used by receipts and conflicts.","type":"string"},"type":{"description":"The field type.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"},"unique":{"description":"Values must differ between records.","type":"boolean"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.fields.create","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.fields.create.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.fields.delete","title":"Delete a field","description":"Deletes a field and its values from every record.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"fieldId":{"description":"The field's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Field"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId","fieldId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What was done.","properties":{"message":{"description":"What was deleted.","type":"string"}},"type":"object"}},"type":"object"},"targets":{"param":"fieldId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.fields.delete","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.fields.delete.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.fields.duplicate","title":"Duplicate a field","description":"Adds a copy of a field's definition (type, options, formula) next to it, titled with \"copy\"; the copy starts with no values.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"fieldId":{"description":"The field's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Field"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId","fieldId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A field (column).","properties":{"ai_prompt":{"description":"A legacy AI prompt.","type":"string"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"formula":{"description":"A formula field's expression.","type":"string"},"id":{"description":"The field's local projection address (fieldId).","type":"integer"},"is_primary":{"description":"It names the record.","type":"boolean"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the field.","type":"object"},"name":{"description":"The key of its values in a record's `values`.","type":"string"},"options":{"additionalProperties":true,"description":"The settings its type reads (choices, target_table_id, …).","type":"object"},"order":{"description":"Its position among the table's fields, from 1.","type":"integer"},"readonly":{"description":"Values are not written by hand (formula and AI fields).","type":"boolean"},"required":{"description":"A record needs a value.","type":"boolean"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The title people see.","type":"string"},"tool_id":{"description":"The stable UUID accepted by fieldId and used by receipts and conflicts.","type":"string"},"type":{"description":"The field type.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"},"unique":{"description":"Values must differ between records.","type":"boolean"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"}},"type":"object"},"targets":{"param":"fieldId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.fields.duplicate","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.fields.duplicate.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.fields.linkCandidates","title":"Find records to link","description":"Searches the records a link_to_record field can link to (in its target table) by their display text, for choosing link values; changes nothing.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"fieldId":{"description":"The field's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Field"]},"limit":{"description":"How many items to answer at most.","type":"integer"},"q":{"description":"Text to match in the candidates' display values.","type":"string"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId","fieldId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Records, as links show them.","properties":{"items":{"items":{"additionalProperties":true,"description":"A linked record.","properties":{"display":{"description":"Its primary value as text.","type":"string"},"row_key":{"description":"The record's row key.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":{"param":"fieldId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.fields.linkCandidates","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.fields.linkCandidates.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.fields.list","title":"List fields","description":"Lists a table's fields (columns) in order, with their ids, names, types and options.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The table's fields, in order.","properties":{"items":{"items":{"additionalProperties":true,"description":"A field (column).","properties":{"ai_prompt":{"description":"A legacy AI prompt.","type":"string"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"formula":{"description":"A formula field's expression.","type":"string"},"id":{"description":"The field's local projection address (fieldId).","type":"integer"},"is_primary":{"description":"It names the record.","type":"boolean"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the field.","type":"object"},"name":{"description":"The key of its values in a record's `values`.","type":"string"},"options":{"additionalProperties":true,"description":"The settings its type reads (choices, target_table_id, …).","type":"object"},"order":{"description":"Its position among the table's fields, from 1.","type":"integer"},"readonly":{"description":"Values are not written by hand (formula and AI fields).","type":"boolean"},"required":{"description":"A record needs a value.","type":"boolean"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The title people see.","type":"string"},"tool_id":{"description":"The stable UUID accepted by fieldId and used by receipts and conflicts.","type":"string"},"type":{"description":"The field type.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"},"unique":{"description":"Values must differ between records.","type":"boolean"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"type":"array"},"total":{"description":"How many there are.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.fields.list","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.fields.list.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.fields.update","title":"Update a field","description":"Changes a field's title, type, options, formula, AI prompt, flags or primary status; values already stored stay as they are when the type changes.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"ai_prompt":{"type":"string"},"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"fieldId":{"description":"The field's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Field"]},"formula":{"type":"string"},"is_primary":{"type":"boolean"},"meta":{},"options":{"additionalProperties":true,"description":"Settings of the field's type: only the keys its type reads matter, and other keys are kept as they are.","properties":{"action":{"description":"button: what it does, {\"kind\": \"open_url\", \"url\"} or {\"kind\": \"run_workflow\", \"workflow_id\"}."},"aggregation":{"description":"rollup: how the linked values combine.","enum":["count","sum","avg","max","min","and","or","concat"],"type":"string"},"ai_config":{"additionalProperties":true,"description":"ai (and text, long_text or attachment fields the host's model fills): what the model does, checked when the field runs. Also summary_instruction, extract_instruction or schema, improve_instruction, max_words, enabled, and image settings.","properties":{"categories":{"description":"classify: two or more categories.","items":{"type":"string"},"type":"array"},"prompt":{"description":"The instruction of customize, text_generation and image_customization.","type":"string"},"source_field_id":{"description":"The field it reads; not needed by customize, text_generation and image_customization.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"target_language":{"description":"translate: the language to write.","type":"string"},"type":{"description":"The action.","enum":["summarize","translate","extract","improve","customize","classify","text_generation","image_generation","image_customization"],"type":"string"}},"type":"object"},"allow_multiple":{"description":"link_to_record: false allows one linked record per cell; default true.","type":"boolean"},"choices":{"description":"single_select, multi_select: the values to choose from, in order, for example [\"Lead\", \"Customer\"].","items":{"type":"string"},"type":"array"},"date_format":{"description":"date, datetime: how the editor shows the value; the stored value does not change.","enum":["year_month_day_slash","year_month_day_time_slash","year_month_day_time_zone_slash","year_month_day_dash","year_month_day_time_dash","year_month_day_time_zone_dash","month_day_dash","month_day_year_slash","day_month_year_slash"],"type":"string"},"icon":{"description":"rating: the symbol shown; default star.","enum":["star","heart","thumbs"],"type":"string"},"label":{"description":"button: the button's text; default the field's title.","type":"string"},"link_field_id":{"description":"lookup, rollup: the link_to_record field of this table to follow.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"max":{"description":"rating: the highest rating, 1 to 10; default 5.","type":"integer"},"multi_value_mode":{"description":"lookup: list answers the values as a list (default), concat as one string.","enum":["list","concat"],"type":"string"},"showAs":{"description":"long_text: show the value as plain text or as rendered markdown.","enum":["text","markdown"],"type":"string"},"symmetric_field_id":{"description":"link_to_record: the link field of the target table that links back, if any.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"target_field_id":{"description":"lookup, rollup: the field of the linked records to read; a rollup without it aggregates the linked records themselves (count).","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"target_table_id":{"description":"link_to_record: the id of the table whose records it links to.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Table"]}},"type":"object"},"readonly":{"type":"boolean"},"required":{"type":"boolean"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"title":{"type":"string"},"type":{"description":"The field's type (default text). There is no email or phone type: use text, or url for a link to open.\ntext: One line of text (a string).\nlong_text: Text of several lines (a string); options.showAs shows it as text or rendered markdown.\nnumber: A number.\ndate: A calendar date written as YYYY-MM-DD; options.date_format is how the editor shows it.\ndatetime: A date and time as an ISO 8601 string; options.date_format is how the editor shows it.\nsingle_select: One of options.choices (a string).\nmulti_select: Some of options.choices (a list of strings).\ncheckbox: true or false.\nurl: A web address (a string).\nattachment: Files kept in the document: a list of the values table.attachments.put answers.\ndocument_link: A reference to another document (a string).\nformula: Computed from the field's `formula` expression, which names fields in braces ({price} * 2); read-only.\nai: Written by the host's model as options.ai_config says (table.ai.prepare, then table.ai.apply); read-only.\nrating: A whole number from 0 to options.max (default 5).\nuser: A person, {id, name, avatar?}, or a list of them.\nlink_to_record: Links to records of the table options.target_table_id names; set with table.links.replace, read as [{row_key, display}].\nlookup: Computed: the values of options.target_field_id in the records linked through options.link_field_id.\nrollup: Computed: options.aggregation over the records linked through options.link_field_id (their options.target_field_id values).\nbutton: A button labelled options.label that runs options.action; it holds no value.\ncreated_time: Reserved for when the record was created; this engine leaves it empty.\nlast_modified_time: Reserved for when the record last changed; this engine leaves it empty.\ncreated_by: Reserved for who created the record; this engine leaves it empty.\nlast_modified_by: Reserved for who last changed the record; this engine leaves it empty.\nauto_number: Reserved for a running number; this engine leaves it empty.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"}},"required":["tableId","fieldId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A field (column).","properties":{"ai_prompt":{"description":"A legacy AI prompt.","type":"string"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"formula":{"description":"A formula field's expression.","type":"string"},"id":{"description":"The field's local projection address (fieldId).","type":"integer"},"is_primary":{"description":"It names the record.","type":"boolean"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the field.","type":"object"},"name":{"description":"The key of its values in a record's `values`.","type":"string"},"options":{"additionalProperties":true,"description":"The settings its type reads (choices, target_table_id, …).","type":"object"},"order":{"description":"Its position among the table's fields, from 1.","type":"integer"},"readonly":{"description":"Values are not written by hand (formula and AI fields).","type":"boolean"},"required":{"description":"A record needs a value.","type":"boolean"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The title people see.","type":"string"},"tool_id":{"description":"The stable UUID accepted by fieldId and used by receipts and conflicts.","type":"string"},"type":{"description":"The field type.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"},"unique":{"description":"Values must differ between records.","type":"boolean"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"}},"type":"object"},"targets":{"param":"fieldId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.fields.update","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.fields.update.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.file.export","title":"Export a table as a CSV or Markdown file","description":"Answers one table as a CSV or Markdown file's bytes (base64, in data) for the host to write as a new file, without changing anything.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"format":{"description":"csv, or md for a Markdown table.","enum":["csv","md"],"type":"string"},"tableId":{"description":"The table to export; default the first table.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["format"],"type":"object"},"result":{"additionalProperties":false,"properties":{"bytes":{"description":"The file's size.","type":"integer"},"data":{"description":"The file's bytes, base64.","type":"string"},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"extension":{"type":"string"},"format":{"type":"string"},"mime":{"type":"string"},"name":{"description":"The table's title.","type":"string"},"tableId":{"type":"integer"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.file.export","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.file.export.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.file.render","title":"Render a preview image","description":"Draws the table, a view, some of its rows, a field, one record's cell or a dashboard as the editor shows them, as a PNG at a scale up to 2, such as the target a diagnostic names; changes nothing.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"maxSize":{"description":"The longest side in pixels, 1 to 4096; default 4096.","type":"integer"},"scale":{"description":"Device pixels per document pixel, above 0 and up to 2; default 1.","type":"number"},"slide":{"description":"Without target: the table at this position among the tables, counted from 0 (a host's part preview).","type":"integer"},"target":{"additionalProperties":false,"description":"What to draw: a table or a view by id (table, view), or a diagnostic's target as the check answered it. table is a table's id (its first view), view a view's id (the records it shows, filtered and in its order). path is tables/<id> (the table as the editor opens it), tables/<id>/views/<id> (a view, the records it shows), tables/<id>/fields/<id>, tables/<id>/records/<id> or tables/<id>/records/<id>/fields/<id> (every field and record of the table, that one outlined and the picture framed around it), or dashboards/<id>; sheet, a table's title, when there is no path. rows [from, to] draws only the records at those positions of the table or view, counted from 1 as the grid numbers them. Default: the first table's first view, whatever the editor shows.","properties":{"path":{"description":"tables/<id>[/views/<id> | /fields/<id> | /records/<id>[/fields/<id>]] or dashboards/<id>, with the ids table_inspect answers.","type":"string"},"rows":{"description":"[from, to]: the records at these positions, counted from 1, both included.","items":{"type":"integer"},"type":"array"},"sheet":{"description":"A table's title (a diagnostic gives it beside path).","type":"string"},"table":{"description":"A table's id, as table_inspect lists it: the table as its first view shows it.","type":"integer"},"view":{"description":"A view's id, as table_inspect lists it: the records it shows, in its order.","type":"integer"}},"type":"object"}},"type":"object"},"result":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"height":{"description":"Its height in pixels.","type":"integer"},"mimeType":{"description":"image/png.","type":"string"},"png":{"description":"Base64 of the PNG.","type":"string"},"scale":{"description":"The scale it was drawn at.","type":"number"},"tableId":{"description":"The table drawn; null for a dashboard.","oneOf":[{"type":"integer"},{"type":"null"}]},"viewId":{"description":"The view drawn; null without one.","oneOf":[{"type":"integer"},{"type":"null"}]},"width":{"description":"Its width in pixels.","type":"integer"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.file.render","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.file.render.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.historyState","title":"Read whether undo and redo are possible","description":"Reads whether there is a step to undo and a step to redo.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"description":"the params of the data-document route GET /history-state: its ids (tableId, …), query values, and body fields","properties":{},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What Undo and Redo would do.","properties":{"canRedo":{"description":"There is a step to redo.","type":"boolean"},"canUndo":{"description":"There is a step to undo.","type":"boolean"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.historyState","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.historyState.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.import.preview","title":"Preview a file import","description":"Parses a CSV, TSV or spreadsheet file given as base64 and answers its sheets, detected columns and types and sample rows, without changing anything.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"content":{"default":"","type":"string"},"fileName":{"default":"","type":"string"},"sheet":{"default":"","type":"string"},"source":{"additionalProperties":false,"description":"A preview request's `source`: `{ kind: \"workspace\", workspace_path }` names the workspace file\nthe host read the bytes from; anything else is an upload named by `fileName`.","properties":{"kind":{"default":"","type":"string"},"workspace_path":{"default":"","type":"string"}},"type":"object"}},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What the file holds and how it would be imported.","properties":{"delimiter":{"description":"The delimiter of a CSV or TSV file.","type":"string"},"encoding":{"description":"The text encoding of a CSV or TSV file.","type":"string"},"expires_at":{"description":"When the preview expires; left out, since the kit keeps none.","type":"integer"},"field_count":{"description":"How many columns.","type":"integer"},"fields":{"items":{"additionalProperties":true,"description":"A column and the field it would become.","properties":{"index":{"description":"The column, from 0.","type":"integer"},"nullable":{"description":"Some rows leave it empty.","type":"boolean"},"options":{"additionalProperties":true,"description":"The detected options (a select's choices).","type":"object"},"sample_values":{"items":{"description":"A value of the first rows."},"type":"array"},"title":{"description":"Its header.","type":"string"},"type":{"description":"The field type detected.","type":"string"}},"type":"object"},"type":"array"},"filename":{"description":"The file's name.","type":"string"},"format":{"description":"csv, tsv, xlsx, xls or ods.","type":"string"},"import_token":{"description":"The preview's token (sha256 of the file).","type":"string"},"row_count":{"description":"How many data rows.","type":"integer"},"sample_rows":{"items":{"items":{"description":"A cell."},"type":"array"},"type":"array"},"selected_sheet":{"description":"The spreadsheet's sheet read.","type":"string"},"sheets":{"items":{"additionalProperties":true,"description":"A sheet of a spreadsheet.","properties":{"field_count":{"description":"How many columns.","type":"integer"},"hidden":{"description":"Hidden in the spreadsheet.","type":"boolean"},"index":{"description":"Its position, from 0.","type":"integer"},"name":{"description":"Its name.","type":"string"},"row_count":{"description":"How many data rows.","type":"integer"}},"type":"object"},"type":"array"},"source":{"additionalProperties":true,"description":"Where the file came from.","properties":{"kind":{"description":"upload.","type":"string"},"upload_name":{"description":"The file's name.","type":"string"},"workspace_path":{"description":"Unused by the kit.","type":"string"}},"type":"object"},"warnings":{"items":{"additionalProperties":true,"description":"Something the import noticed.","properties":{"code":{"description":"A stable code.","type":"string"},"column":{"description":"The column, from 1, when it is about one.","type":"integer"},"message":{"description":"What happened.","type":"string"},"row":{"description":"The row, from 1, when it is about one.","type":"integer"},"severity":{"description":"info, warning or error.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.import.preview","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.import.preview.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.import.run","title":"Import a file into a table","description":"Imports a file given as base64 into a new or existing table, with write mode, schema mode, unique key and field overrides.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"content":{"default":"","type":"string"},"field_overrides":{"items":{"additionalProperties":false,"properties":{"index":{"default":0,"type":"integer"},"options":{"additionalProperties":true,"type":"object"},"title":{"default":"","type":"string"},"type":{"default":"","type":"string"}},"type":"object"},"type":"array"},"fileName":{"default":"","type":"string"},"idempotency_key":{"default":"","type":"string"},"import_token":{"default":"","type":"string"},"schema_mode":{"default":"","type":"string"},"sheet":{"default":"","type":"string"},"source":{"additionalProperties":false,"description":"A preview request's `source`: `{ kind: \"workspace\", workspace_path }` names the workspace file\nthe host read the bytes from; anything else is an upload named by `fileName`.","properties":{"kind":{"default":"","type":"string"},"workspace_path":{"default":"","type":"string"}},"type":"object"},"target":{"additionalProperties":false,"description":"The execute request's `target`. `document_id` is not checked: the kit has one document.","properties":{"document_id":{"default":0,"type":"integer"},"kind":{"default":"","type":"string"},"path":{"default":"","type":"string"},"table_id":{"default":0,"oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Table"]},"table_title":{"default":"","type":"string","x-khp-role":"place"}},"type":"object"},"unique_by":{"default":[],"items":{"type":"string"},"type":"array"},"write_mode":{"default":"","type":"string"}},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What the import did.","properties":{"document_id":{"description":"The document's id.","type":"integer"},"fields_created":{"description":"Fields created.","type":"integer"},"fields_updated":{"description":"Fields changed.","type":"integer"},"path":{"description":"The document's path.","type":"string"},"rows_created":{"description":"Records created.","type":"integer"},"rows_skipped":{"description":"Rows left out.","type":"integer"},"rows_total":{"description":"Rows read.","type":"integer"},"rows_updated":{"description":"Records updated (upsert).","type":"integer"},"table_id":{"description":"The table written.","type":"integer"},"warnings":{"items":{"additionalProperties":true,"description":"Something the import noticed.","properties":{"code":{"description":"A stable code.","type":"string"},"column":{"description":"The column, from 1, when it is about one.","type":"integer"},"message":{"description":"What happened.","type":"string"},"row":{"description":"The row, from 1, when it is about one.","type":"integer"},"severity":{"description":"info, warning or error.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.import.run","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.import.run.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.links.delete","title":"Remove a record's links","description":"Removes some of one record's links in a link_to_record field, by the linked records' row keys.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"field_id":{"oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Field"]},"recordId":{"description":"The record's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Record"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"target_row_keys":{"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array","x-khp-types":["Record"]}},"required":["tableId","recordId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Done.","properties":{"ok":{"description":"Always true.","type":"boolean"}},"type":"object"}},"type":"object"},"targets":{"param":"recordId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.links.delete","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.links.delete.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.links.list","title":"List a record's links","description":"Reads the records one record links to through a link_to_record field, as row keys and display text.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"field_id":{"description":"The link field's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Field"]},"recordId":{"description":"The record's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Record"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId","recordId","field_id"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Records, as links show them.","properties":{"items":{"items":{"additionalProperties":true,"description":"A linked record.","properties":{"display":{"description":"Its primary value as text.","type":"string"},"row_key":{"description":"The record's row key.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":{"param":"recordId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.links.list","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.links.list.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.links.replace","title":"Set a record's links","description":"Sets the records one record links to through a link_to_record field, replacing its current links.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"field_id":{"oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Field"]},"recordId":{"description":"The record's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Record"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"target_row_keys":{"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array","x-khp-types":["Record"]}},"required":["tableId","recordId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Records, as links show them.","properties":{"items":{"items":{"additionalProperties":true,"description":"A linked record.","properties":{"display":{"description":"Its primary value as text.","type":"string"},"row_key":{"description":"The record's row key.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":{"param":"recordId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.links.replace","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.links.replace.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.markdown.export","title":"Export a table as a Markdown table","description":"Answers a table as a Markdown table, without changing anything.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The table as Markdown.","properties":{"content":{"description":"The Markdown table.","type":"string"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.markdown.export","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.markdown.export.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.preview.show","title":"Show a table, view or dashboard in the picture","description":"Picks what the document's picture (its renders and previews) shows: a table with its first view, a view, or a dashboard; without parameters, what the editor opens (the first table's first view).","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"dashboardId":{"description":"A dashboard to show instead of a table.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Dashboard"]},"tableId":{"description":"The table to show, with its first view unless viewId names another. Default: the first table.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"The view to show (its table is shown).","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What the picture shows now.","properties":{"dashboard":{"description":"The dashboard's title.","type":"string"},"dashboardId":{"description":"The dashboard shown; null for a table.","oneOf":[{"description":"The dashboard shown; null for a table.","type":"string"},{"type":"null"}]},"records":{"description":"How many records the view shows.","type":"integer"},"table":{"description":"The table's title.","type":"string"},"tableId":{"description":"The table shown; null for a dashboard.","oneOf":[{"description":"The table shown; null for a dashboard.","type":"integer"},{"type":"null"}]},"view":{"description":"The view's title.","type":"string"},"viewId":{"description":"The view shown.","oneOf":[{"description":"The view shown.","type":"integer"},{"type":"null"}]},"viewType":{"description":"The view's type: grid, kanban, calendar or gallery.","type":"string"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.preview.show","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.preview.show.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.read","title":"Read a table's or a view's records","description":"Reads the records of one table, or of one view (only those its filter keeps, in its order), with their ids and values under the field names, a page at a time; changes nothing.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"cursor":{"description":"Where to go on: the cursor in a previous answer's next (the number of records before the page, counted from 0, as a string); default the first record.","type":"string"},"limit":{"description":"How many records to list, 1 to 200; default 50.","type":"integer"},"tableId":{"description":"The table whose records to list, in order (a table's id, as inspect and table.tables.list answer it).","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"Instead of tableId: the view whose records to list, only those its filter keeps, in its order (a view's id, as inspect and table.views.list answer it).","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A page of the records of a table or a view.","properties":{"columns":{"items":{"description":"A field's name: the key of its values in table.records.create and table.records.update.","type":"string"},"type":"array"},"from":{"description":"The first listed record's position, counted from 1.","type":"integer"},"next":{"additionalProperties":true,"description":"The step that lists the records after these; absent after the last.","properties":{"command":{"description":"table.read.","type":"string"},"params":{"additionalProperties":true,"description":"Its params: the same tableId or viewId, and the cursor to go on from.","type":"object"}},"type":"object"},"rows":{"items":{"additionalProperties":true,"description":"A record.","properties":{"cells":{"items":{"description":"Its value in the column at the same position; null when empty. A link's records are {id, display}, by record id; text longer than 200 characters is cut and ends in an ellipsis."},"type":"array"},"id":{"description":"The record's local projection address (recordId).","type":"integer"},"tool_id":{"description":"The stable UUID accepted by recordId and used by receipts and conflicts.","type":"string"}},"type":"object"},"type":"array"},"tableId":{"description":"The table's id.","type":"integer"},"to":{"description":"The last listed record's position, counted from 1.","type":"integer"},"total":{"description":"How many records the table has, or the view shows.","type":"integer"},"viewId":{"description":"The view's id, when a view was read.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.read","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.read.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.records.bulkCopy","title":"Copy records","description":"Copies records by row_key into the same table at a position, as one step; answers the copies' row keys.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"row_keys":{"default":[],"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array","x-khp-types":["Record"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"target_position":{"default":0,"type":"integer"}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The copies.","properties":{"copied_count":{"description":"How many records were copied.","type":"integer"},"new_row_keys":{"items":{"description":"A copy's row key, in order.","type":"string"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.records.bulkCopy","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.records.bulkCopy.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.records.bulkDelete","title":"Delete many records","description":"Deletes many records at once by row_key, as one step; answers how many went and which keys named no record.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"row_keys":{"default":[],"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array","x-khp-types":["Record"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"target_position":{"default":0,"type":"integer"}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What was deleted.","properties":{"deleted_count":{"description":"How many records were deleted.","type":"integer"},"missing_keys":{"items":{"description":"A row key that names no record.","type":"string"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.records.bulkDelete","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.records.bulkDelete.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.records.create","title":"Create a record","description":"Adds one record to a table with values keyed by field name (not title); a key that names no field is refused and nothing is written. Answers the record with its id and row_key.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"order":{"type":"integer"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"values":{"additionalProperties":true,"description":"Values keyed by field name. Creation must supply every writable required field; inspect the table first. For the starter table, use {\"title\":\"New record\"}.","examples":[{"title":"New record"}],"type":"object"}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A record (row).","properties":{"changed":{"description":"Whether the call changed the record: false when every value was already so.","type":"boolean"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The record's local projection address (recordId).","type":"integer"},"order":{"description":"Its position in the table, from 1.","type":"integer"},"row_key":{"description":"The record's stable key, used by links, bulk commands and transact.","type":"string"},"table_id":{"description":"The table's id.","type":"integer"},"tool_id":{"description":"The stable UUID accepted by recordId and used by receipts and conflicts.","type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"},"values":{"additionalProperties":true,"description":"Its values, keyed by field name; a missing key is an empty value.","type":"object"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.records.create","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.records.create.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.records.delete","title":"Delete a record","description":"Deletes one record and its links.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"recordId":{"description":"The record's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Record"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId","recordId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What was done.","properties":{"message":{"description":"What was deleted.","type":"string"}},"type":"object"}},"type":"object"},"targets":{"param":"recordId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.records.delete","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.records.delete.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.records.history","title":"Read a record's history","description":"Reads one record's change history, newest first: its creation and each field update, with the values before and after, who made it and when.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"limit":{"description":"How many items to answer at most.","type":"integer"},"offset":{"description":"How many items to skip, from 0.","type":"integer"},"recordId":{"description":"The record's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Record"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId","recordId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A page of the record's history, newest first.","properties":{"items":{"items":{"additionalProperties":true,"description":"One change.","properties":{"action":{"description":"What happened.","enum":["create","update","delete"],"type":"string"},"actor":{"description":"Who made the change.","type":"string"},"after":{"description":"The value after (the whole record's values for a create)."},"before":{"description":"The value before (the whole record's values for a delete)."},"created_at":{"description":"When, in Unix milliseconds.","type":"integer"},"document_id":{"description":"The document's KDM id.","type":"string"},"field_id":{"description":"The field changed; null for a create or delete.","oneOf":[{"description":"The field changed; null for a create or delete.","type":"integer"},{"type":"null"}]},"id":{"description":"The entry's id.","type":"integer"},"record_id":{"description":"The record's id.","type":"integer"},"table_id":{"description":"The table's id.","type":"integer"}},"type":"object"},"type":"array"},"limit":{"description":"The page size.","type":"integer"},"offset":{"description":"How many were skipped.","type":"integer"},"total":{"description":"How many entries there are.","type":"integer"}},"type":"object"}},"type":"object"},"targets":{"param":"recordId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.records.history","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.records.history.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.records.list","title":"List records","description":"Reads a table's records (rows) with their values keyed by field name, a page at a time (limit, offset), with the total.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"limit":{"description":"How many items to answer at most.","type":"integer"},"offset":{"description":"How many items to skip, from 0.","type":"integer"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A page of records.","properties":{"items":{"items":{"additionalProperties":true,"description":"A record (row).","properties":{"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The record's local projection address (recordId).","type":"integer"},"order":{"description":"Its position in the table, from 1.","type":"integer"},"row_key":{"description":"The record's stable key, used by links, bulk commands and transact.","type":"string"},"table_id":{"description":"The table's id.","type":"integer"},"tool_id":{"description":"The stable UUID accepted by recordId and used by receipts and conflicts.","type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"},"values":{"additionalProperties":true,"description":"Its values, keyed by field name; a missing key is an empty value.","type":"object"}},"type":"object"},"type":"array"},"limit":{"description":"The page size.","type":"integer"},"offset":{"description":"How many were skipped.","type":"integer"},"total":{"description":"How many records the table has.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.records.list","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.records.list.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.records.update","title":"Update a record","description":"Changes values of one record, keyed by field name (null clears one); fields not named keep their values, and a key that names no field is refused, changing nothing.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"order":{"type":"integer"},"recordId":{"description":"The record's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Record"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"values":{"additionalProperties":true,"description":"Values keyed by field name. Creation must supply every writable required field; inspect the table first. For the starter table, use {\"title\":\"New record\"}.","examples":[{"title":"New record"}],"type":"object"}},"required":["tableId","recordId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A record (row).","properties":{"changed":{"description":"Whether the call changed the record: false when every value was already so.","type":"boolean"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The record's local projection address (recordId).","type":"integer"},"order":{"description":"Its position in the table, from 1.","type":"integer"},"row_key":{"description":"The record's stable key, used by links, bulk commands and transact.","type":"string"},"table_id":{"description":"The table's id.","type":"integer"},"tool_id":{"description":"The stable UUID accepted by recordId and used by receipts and conflicts.","type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"},"values":{"additionalProperties":true,"description":"Its values, keyed by field name; a missing key is an empty value.","type":"object"}},"type":"object"}},"type":"object"},"targets":{"param":"recordId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.records.update","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.records.update.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.redo","title":"Redo a step","description":"Puts back the last undone step of one scope (by default the caller's own) and answers what it changed, as edit.redo does.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"scope":{"description":"Whose step: the person's or the agent's. By default the scope of whoever runs it (an agent undoes only its own steps).","enum":["person","agent"],"type":"string"}},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Whether a step was taken back (or put back).","properties":{"change":{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},"done":{"description":"False when there was no step.","type":"boolean"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.redo","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.redo.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.tables.create","title":"Create a table","description":"Creates a table from a title and optionally its fields (each with a type and options) and views; without fields it gets a primary text field Title, without views a grid view All. Answers the table with its ids.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"description":{"default":"","type":"string"},"fields":{"default":[],"items":{"additionalProperties":false,"properties":{"ai_prompt":{"default":"","type":"string"},"formula":{"default":"","type":"string"},"name":{"description":"The field's internal name, the key of its values when a field: lowercase ASCII letters, digits and `_`, starting with a letter and not ending with `_` (`^[a-z](?:[a-z0-9_]*[a-z0-9])?$`), unique among the table's fields. An explicit name is kept as given; one not in that form, or already taken (also by an earlier field of the same call), is refused with invalid_params. Without one it is derived from the title: letters and digits kept and lowercased, every other run of characters made one `_`, `_` trimmed, `f_` put before a leading digit, `field` when nothing is left (a title in Chinese, say, for a table too), then `_2`, `_3`, ... when taken.","type":"string"},"options":{"additionalProperties":true,"description":"Settings of the field's type: only the keys its type reads matter, and other keys are kept as they are.","properties":{"action":{"description":"button: what it does, {\"kind\": \"open_url\", \"url\"} or {\"kind\": \"run_workflow\", \"workflow_id\"}."},"aggregation":{"description":"rollup: how the linked values combine.","enum":["count","sum","avg","max","min","and","or","concat"],"type":"string"},"ai_config":{"additionalProperties":true,"description":"ai (and text, long_text or attachment fields the host's model fills): what the model does, checked when the field runs. Also summary_instruction, extract_instruction or schema, improve_instruction, max_words, enabled, and image settings.","properties":{"categories":{"description":"classify: two or more categories.","items":{"type":"string"},"type":"array"},"prompt":{"description":"The instruction of customize, text_generation and image_customization.","type":"string"},"source_field_id":{"description":"The field it reads; not needed by customize, text_generation and image_customization.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"target_language":{"description":"translate: the language to write.","type":"string"},"type":{"description":"The action.","enum":["summarize","translate","extract","improve","customize","classify","text_generation","image_generation","image_customization"],"type":"string"}},"type":"object"},"allow_multiple":{"description":"link_to_record: false allows one linked record per cell; default true.","type":"boolean"},"choices":{"description":"single_select, multi_select: the values to choose from, in order, for example [\"Lead\", \"Customer\"].","items":{"type":"string"},"type":"array"},"date_format":{"description":"date, datetime: how the editor shows the value; the stored value does not change.","enum":["year_month_day_slash","year_month_day_time_slash","year_month_day_time_zone_slash","year_month_day_dash","year_month_day_time_dash","year_month_day_time_zone_dash","month_day_dash","month_day_year_slash","day_month_year_slash"],"type":"string"},"icon":{"description":"rating: the symbol shown; default star.","enum":["star","heart","thumbs"],"type":"string"},"label":{"description":"button: the button's text; default the field's title.","type":"string"},"link_field_id":{"description":"lookup, rollup: the link_to_record field of this table to follow.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"max":{"description":"rating: the highest rating, 1 to 10; default 5.","type":"integer"},"multi_value_mode":{"description":"lookup: list answers the values as a list (default), concat as one string.","enum":["list","concat"],"type":"string"},"showAs":{"description":"long_text: show the value as plain text or as rendered markdown.","enum":["text","markdown"],"type":"string"},"symmetric_field_id":{"description":"link_to_record: the link field of the target table that links back, if any.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"target_field_id":{"description":"lookup, rollup: the field of the linked records to read; a rollup without it aggregates the linked records themselves (count).","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"target_table_id":{"description":"link_to_record: the id of the table whose records it links to.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Table"]}},"type":"object"},"primary":{"default":false,"type":"boolean"},"readonly":{"default":false,"type":"boolean"},"required":{"default":false,"type":"boolean"},"title":{"default":"","type":"string"},"type":{"description":"The field's type (default text). There is no email or phone type: use text, or url for a link to open.\ntext: One line of text (a string).\nlong_text: Text of several lines (a string); options.showAs shows it as text or rendered markdown.\nnumber: A number.\ndate: A calendar date written as YYYY-MM-DD; options.date_format is how the editor shows it.\ndatetime: A date and time as an ISO 8601 string; options.date_format is how the editor shows it.\nsingle_select: One of options.choices (a string).\nmulti_select: Some of options.choices (a list of strings).\ncheckbox: true or false.\nurl: A web address (a string).\nattachment: Files kept in the document: a list of the values table.attachments.put answers.\ndocument_link: A reference to another document (a string).\nformula: Computed from the field's `formula` expression, which names fields in braces ({price} * 2); read-only.\nai: Written by the host's model as options.ai_config says (table.ai.prepare, then table.ai.apply); read-only.\nrating: A whole number from 0 to options.max (default 5).\nuser: A person, {id, name, avatar?}, or a list of them.\nlink_to_record: Links to records of the table options.target_table_id names; set with table.links.replace, read as [{row_key, display}].\nlookup: Computed: the values of options.target_field_id in the records linked through options.link_field_id.\nrollup: Computed: options.aggregation over the records linked through options.link_field_id (their options.target_field_id values).\nbutton: A button labelled options.label that runs options.action; it holds no value.\ncreated_time: Reserved for when the record was created; this engine leaves it empty.\nlast_modified_time: Reserved for when the record last changed; this engine leaves it empty.\ncreated_by: Reserved for who created the record; this engine leaves it empty.\nlast_modified_by: Reserved for who last changed the record; this engine leaves it empty.\nauto_number: Reserved for a running number; this engine leaves it empty.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"}},"type":"object"},"type":"array"},"name":{"description":"The table's internal name, the key of its values when a field: lowercase ASCII letters, digits and `_`, starting with a letter and not ending with `_` (`^[a-z](?:[a-z0-9_]*[a-z0-9])?$`), unique among the document's tables. An explicit name is kept as given; one not in that form, or already taken (also by an earlier field of the same call), is refused with invalid_params. Without one it is derived from the title: letters and digits kept and lowercased, every other run of characters made one `_`, `_` trimmed, `f_` put before a leading digit, `field` when nothing is left (a title in Chinese, say, for a table too), then `_2`, `_3`, ... when taken.","type":"string"},"title":{"default":"","type":"string"},"views":{"default":[],"items":{"additionalProperties":false,"properties":{"config":{},"title":{"default":"","type":"string"},"type":{"description":"The view's type (default grid).\ngrid: Rows and columns.\nkanban: Cards in columns, one per choice of a single_select field (config group_field_name, else the first single_select) or per checkbox value.\ncalendar: Records placed on the table's first date or datetime field.\ngallery: Cards with a cover picture (config cover_field_name, else the first attachment or url field).","enum":["grid","kanban","calendar","gallery"],"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A table with its fields and views.","properties":{"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"description":{"description":"The table's description.","type":"string"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"fields":{"items":{"additionalProperties":true,"description":"A field (column).","properties":{"ai_prompt":{"description":"A legacy AI prompt.","type":"string"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"formula":{"description":"A formula field's expression.","type":"string"},"id":{"description":"The field's local projection address (fieldId).","type":"integer"},"is_primary":{"description":"It names the record.","type":"boolean"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the field.","type":"object"},"name":{"description":"The key of its values in a record's `values`.","type":"string"},"options":{"additionalProperties":true,"description":"The settings its type reads (choices, target_table_id, …).","type":"object"},"order":{"description":"Its position among the table's fields, from 1.","type":"integer"},"readonly":{"description":"Values are not written by hand (formula and AI fields).","type":"boolean"},"required":{"description":"A record needs a value.","type":"boolean"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The title people see.","type":"string"},"tool_id":{"description":"The stable UUID accepted by fieldId and used by receipts and conflicts.","type":"string"},"type":{"description":"The field type.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"},"unique":{"description":"Values must differ between records.","type":"boolean"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"type":"array"},"id":{"description":"The table's local projection address (tableId).","type":"integer"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the table.","type":"object"},"name":{"description":"The table's internal name.","type":"string"},"order":{"description":"Its position among the tables, from 1.","type":"integer"},"primary_field_id":{"description":"The id of the field that names a record.","oneOf":[{"description":"The id of the field that names a record.","type":"integer"},{"type":"null"}]},"title":{"description":"The table's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by tableId and used by receipts and conflicts.","type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"},"views":{"items":{"additionalProperties":true,"description":"A view of a table.","properties":{"config":{"additionalProperties":true,"description":"Its filters, sorts, groups and display settings.","type":"object"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The view's local projection address (viewId).","type":"integer"},"locked":{"description":"The view is locked against changes in the editor.","type":"boolean"},"order":{"description":"Its position among the table's views, from 1.","type":"integer"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The view's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by viewId and used by receipts and conflicts.","type":"string"},"type":{"description":"The view type.","enum":["grid","kanban","calendar","gallery"],"type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.tables.create","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.tables.create.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.tables.delete","title":"Delete a table","description":"Deletes a table with its fields, records and views, and every link to or from its records.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What was done.","properties":{"message":{"description":"What was deleted.","type":"string"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.tables.delete","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.tables.delete.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.tables.list","title":"List tables","description":"Lists every table with its id, name, title, fields (ids, names, types, options) and views; start here to learn the ids and field names other calls need.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"description":"the params of the data-document route GET /tables: its ids (tableId, …), query values, and body fields","properties":{},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Every table, with its fields and views.","properties":{"items":{"items":{"additionalProperties":true,"description":"A table with its fields and views.","properties":{"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"description":{"description":"The table's description.","type":"string"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"fields":{"items":{"additionalProperties":true,"description":"A field (column).","properties":{"ai_prompt":{"description":"A legacy AI prompt.","type":"string"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"formula":{"description":"A formula field's expression.","type":"string"},"id":{"description":"The field's local projection address (fieldId).","type":"integer"},"is_primary":{"description":"It names the record.","type":"boolean"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the field.","type":"object"},"name":{"description":"The key of its values in a record's `values`.","type":"string"},"options":{"additionalProperties":true,"description":"The settings its type reads (choices, target_table_id, …).","type":"object"},"order":{"description":"Its position among the table's fields, from 1.","type":"integer"},"readonly":{"description":"Values are not written by hand (formula and AI fields).","type":"boolean"},"required":{"description":"A record needs a value.","type":"boolean"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The title people see.","type":"string"},"tool_id":{"description":"The stable UUID accepted by fieldId and used by receipts and conflicts.","type":"string"},"type":{"description":"The field type.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"},"unique":{"description":"Values must differ between records.","type":"boolean"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"type":"array"},"id":{"description":"The table's local projection address (tableId).","type":"integer"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the table.","type":"object"},"name":{"description":"The table's internal name.","type":"string"},"order":{"description":"Its position among the tables, from 1.","type":"integer"},"primary_field_id":{"description":"The id of the field that names a record.","oneOf":[{"description":"The id of the field that names a record.","type":"integer"},{"type":"null"}]},"title":{"description":"The table's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by tableId and used by receipts and conflicts.","type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"},"views":{"items":{"additionalProperties":true,"description":"A view of a table.","properties":{"config":{"additionalProperties":true,"description":"Its filters, sorts, groups and display settings.","type":"object"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The view's local projection address (viewId).","type":"integer"},"locked":{"description":"The view is locked against changes in the editor.","type":"boolean"},"order":{"description":"Its position among the table's views, from 1.","type":"integer"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The view's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by viewId and used by receipts and conflicts.","type":"string"},"type":{"description":"The view type.","enum":["grid","kanban","calendar","gallery"],"type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"total":{"description":"How many there are.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.tables.list","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.tables.list.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.tables.update","title":"Update a table","description":"Changes a table's title, description, metadata or primary field; its fields and records stay as they are.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"description":{"description":"The table's new description.","type":"string"},"meta":{"description":"Free-form metadata the host keeps with the table."},"primary_field_id":{"description":"The id of the field that becomes the primary field.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Field"]},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"title":{"description":"The table's new title.","type":"string"}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A table with its fields and views.","properties":{"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"description":{"description":"The table's description.","type":"string"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"fields":{"items":{"additionalProperties":true,"description":"A field (column).","properties":{"ai_prompt":{"description":"A legacy AI prompt.","type":"string"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"formula":{"description":"A formula field's expression.","type":"string"},"id":{"description":"The field's local projection address (fieldId).","type":"integer"},"is_primary":{"description":"It names the record.","type":"boolean"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the field.","type":"object"},"name":{"description":"The key of its values in a record's `values`.","type":"string"},"options":{"additionalProperties":true,"description":"The settings its type reads (choices, target_table_id, …).","type":"object"},"order":{"description":"Its position among the table's fields, from 1.","type":"integer"},"readonly":{"description":"Values are not written by hand (formula and AI fields).","type":"boolean"},"required":{"description":"A record needs a value.","type":"boolean"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The title people see.","type":"string"},"tool_id":{"description":"The stable UUID accepted by fieldId and used by receipts and conflicts.","type":"string"},"type":{"description":"The field type.","enum":["text","long_text","number","date","datetime","single_select","multi_select","checkbox","url","attachment","document_link","formula","ai","rating","user","link_to_record","lookup","rollup","button","created_time","last_modified_time","created_by","last_modified_by","auto_number"],"type":"string"},"unique":{"description":"Values must differ between records.","type":"boolean"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"type":"array"},"id":{"description":"The table's local projection address (tableId).","type":"integer"},"meta":{"additionalProperties":true,"description":"Metadata the host keeps with the table.","type":"object"},"name":{"description":"The table's internal name.","type":"string"},"order":{"description":"Its position among the tables, from 1.","type":"integer"},"primary_field_id":{"description":"The id of the field that names a record.","oneOf":[{"description":"The id of the field that names a record.","type":"integer"},{"type":"null"}]},"title":{"description":"The table's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by tableId and used by receipts and conflicts.","type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"},"views":{"items":{"additionalProperties":true,"description":"A view of a table.","properties":{"config":{"additionalProperties":true,"description":"Its filters, sorts, groups and display settings.","type":"object"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The view's local projection address (viewId).","type":"integer"},"locked":{"description":"The view is locked against changes in the editor.","type":"boolean"},"order":{"description":"Its position among the table's views, from 1.","type":"integer"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The view's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by viewId and used by receipts and conflicts.","type":"string"},"type":{"description":"The view type.","enum":["grid","kanban","calendar","gallery"],"type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.tables.update","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.tables.update.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.transact","title":"Run record and field operations as one step","description":"Runs several record and field operations (set cells, create, delete or move records, move fields) as one atomic step that undoes together; a values key that names no field refuses the whole call.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"ops":{"items":{"description":"One step of a transaction.","oneOf":[{"additionalProperties":false,"description":"Sets cells of existing records; `null` clears. Computed fields are skipped; `transact`\nrefuses a key that names no field of the table.","properties":{"op":{"enum":["cells.set"],"type":"string"},"records":{"items":{"additionalProperties":false,"properties":{"rowKey":{"oneOf":[{"type":"integer"},{"type":"string"}]},"values":{"additionalProperties":true,"type":"object"}},"required":["rowKey","values"],"type":"object"},"type":"array"},"tableId":{"oneOf":[{"type":"integer"},{"type":"string"}]}},"required":["tableId","records","op"],"type":"object"},{"additionalProperties":false,"description":"Creates records (field name to initial value) at `at`; `null` appends. `transact` refuses\na key that names no field of the table.","properties":{"at":{"description":"Where `records.create` inserts: `{\"before\": rowKey}` or `{\"after\": rowKey}`.","oneOf":[{"additionalProperties":false,"properties":{"before":{"oneOf":[{"type":"integer"},{"type":"string"}]}},"required":["before"],"type":"object"},{"additionalProperties":false,"properties":{"after":{"oneOf":[{"type":"integer"},{"type":"string"}]}},"required":["after"],"type":"object"}]},"op":{"enum":["records.create"],"type":"string"},"records":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"tableId":{"oneOf":[{"type":"integer"},{"type":"string"}]}},"required":["tableId","records","op"],"type":"object"},{"additionalProperties":false,"description":"Deletes records and their links; unknown row keys are skipped.","properties":{"op":{"enum":["records.delete"],"type":"string"},"rowKeys":{"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array"},"tableId":{"oneOf":[{"type":"integer"},{"type":"string"}]}},"required":["tableId","rowKeys","op"],"type":"object"},{"additionalProperties":false,"description":"Moves records, in the given order, to just before `before` (`null`: the end).","properties":{"before":{"oneOf":[{"type":"integer"},{"type":"string"}]},"op":{"enum":["records.move"],"type":"string"},"rowKeys":{"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array"},"tableId":{"oneOf":[{"type":"integer"},{"type":"string"}]}},"required":["tableId","rowKeys","op"],"type":"object"},{"additionalProperties":false,"description":"Moves fields so the first becomes the `toIndex`-th of the table's other fields.","properties":{"fieldIds":{"items":{"oneOf":[{"type":"integer"},{"type":"string"}]},"type":"array"},"op":{"enum":["fields.move"],"type":"string"},"tableId":{"oneOf":[{"type":"integer"},{"type":"string"}]},"toIndex":{"type":"integer"}},"required":["tableId","fieldIds","toIndex","op"],"type":"object"}]},"type":"array"}},"required":["ops"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What the operations did.","properties":{"change":{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},"created":{"items":{"description":"The row key of a record the operations created.","type":"string"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.transact","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.transact.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.undo","title":"Undo a step","description":"Takes back the last step of one scope (person or agent; by default the caller's own) and answers what it changed, as edit.undo does.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"scope":{"description":"Whose step: the person's or the agent's. By default the scope of whoever runs it (an agent undoes only its own steps).","enum":["person","agent"],"type":"string"}},"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"Whether a step was taken back (or put back).","properties":{"change":{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},"done":{"description":"False when there was no step.","type":"boolean"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.undo","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.undo.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.create","title":"Create a view","description":"Creates a view of a table with a title, a type (grid, kanban, calendar or gallery) and a configuration; answers the view with its id.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"config":{},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"title":{"default":"","type":"string"},"type":{"description":"The view's type (default grid).\ngrid: Rows and columns.\nkanban: Cards in columns, one per choice of a single_select field (config group_field_name, else the first single_select) or per checkbox value.\ncalendar: Records placed on the table's first date or datetime field.\ngallery: Cards with a cover picture (config cover_field_name, else the first attachment or url field).","enum":["grid","kanban","calendar","gallery"],"type":"string"}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A view of a table.","properties":{"config":{"additionalProperties":true,"description":"Its filters, sorts, groups and display settings.","type":"object"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The view's local projection address (viewId).","type":"integer"},"locked":{"description":"The view is locked against changes in the editor.","type":"boolean"},"order":{"description":"Its position among the table's views, from 1.","type":"integer"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The view's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by viewId and used by receipts and conflicts.","type":"string"},"type":{"description":"The view type.","enum":["grid","kanban","calendar","gallery"],"type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.create","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.create.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.delete","title":"Delete a view","description":"Deletes a view; the table's data is not affected.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"required":["tableId","viewId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"What was done.","properties":{"message":{"description":"What was deleted.","type":"string"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.delete","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.delete.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.getFilterTree","title":"Read a view's filter","description":"Reads a view's filter as a tree of and/or groups of field conditions (null when it has none).","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"required":["tableId","viewId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The view's filter.","properties":{"tree":{"description":"A group of conditions.","oneOf":[{"additionalProperties":true,"description":"A group of conditions.","properties":{"children":{"items":{"additionalProperties":true,"description":"A condition or a nested group.","properties":{"condition":{"additionalProperties":true,"description":"A field condition.","properties":{"field_id":{"description":"The field's id.","type":"integer"},"operator":{"description":"The comparison, such as eq, neq, contains, is_empty or is_not_empty.","type":"string"},"value":{"description":"The value to compare with."}},"type":"object"},"group":{"additionalProperties":true,"description":"A group of conditions.","properties":{"children":{"items":{"additionalProperties":true,"description":"A condition or a nested group.","properties":{"condition":{"additionalProperties":true,"description":"A field condition.","properties":{"field_id":{"description":"The field's id.","type":"integer"},"operator":{"description":"The comparison, such as eq, neq, contains, is_empty or is_not_empty.","type":"string"},"value":{"description":"The value to compare with."}},"type":"object"},"group":{"description":"A nested group, as this one."}},"type":"object"},"type":"array"},"conjunction":{"description":"Whether all children or any child must hold.","enum":["and","or"],"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"conjunction":{"description":"Whether all children or any child must hold.","enum":["and","or"],"type":"string"}},"type":"object"},{"type":"null"}]}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.getFilterTree","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.getFilterTree.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.getGroups","title":"Read a view's groups","description":"Reads how a view groups its records: the fields and directions.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"required":["tableId","viewId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The fields, first to last.","properties":{"items":{"items":{"additionalProperties":true,"description":"One field.","properties":{"direction":{"description":"Ascending or descending.","enum":["asc","desc"],"type":"string"},"field_id":{"description":"The field's id.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.getGroups","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.getGroups.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.getSorts","title":"Read a view's sorts","description":"Reads a view's sort order: the fields and directions, first to last.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"required":["tableId","viewId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The fields, first to last.","properties":{"items":{"items":{"additionalProperties":true,"description":"One field.","properties":{"direction":{"description":"Ascending or descending.","enum":["asc","desc"],"type":"string"},"field_id":{"description":"The field's id.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.getSorts","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.getSorts.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.list","title":"List views","description":"Lists a table's views (grid, kanban, calendar, gallery) with their ids, types and configuration.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]}},"required":["tableId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The table's views, in order.","properties":{"items":{"items":{"additionalProperties":true,"description":"A view of a table.","properties":{"config":{"additionalProperties":true,"description":"Its filters, sorts, groups and display settings.","type":"object"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The view's local projection address (viewId).","type":"integer"},"locked":{"description":"The view is locked against changes in the editor.","type":"boolean"},"order":{"description":"Its position among the table's views, from 1.","type":"integer"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The view's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by viewId and used by receipts and conflicts.","type":"string"},"type":{"description":"The view type.","enum":["grid","kanban","calendar","gallery"],"type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"},"type":"array"},"total":{"description":"How many there are.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.list","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.list.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.listFields","title":"List a view's field settings","description":"Lists the per-field settings a view stores (visibility, width, position, frozen); fields without settings show with the defaults.","mutates":false,"tool":"table_run","params":{"additionalProperties":false,"properties":{"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"required":["tableId","viewId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The settings the view stores; fields without any show with the defaults.","properties":{"items":{"items":{"additionalProperties":true,"description":"One field's settings in one view.","properties":{"field_id":{"description":"The field's id.","type":"integer"},"frozen":{"description":"Kept in view while scrolling sideways.","type":"boolean"},"position":{"description":"Its position in the view.","type":"integer"},"view_id":{"description":"The view's id.","type":"integer"},"visible":{"description":"Shown in the view.","type":"boolean"},"width":{"description":"Its column width in pixels, 40 to 1200.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.listFields","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.listFields.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.patchConfig","title":"Change a view's row height or frozen columns","description":"Changes a view's row height or frozen column count, keeping the rest of its configuration; answers the whole configuration.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"frozen_column_count":{"type":"integer"},"row_height":{"type":"string"},"search_query":{"type":"string"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"required":["tableId","viewId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The view's whole configuration after the change.","properties":{"config":{"additionalProperties":true,"description":"filter_tree, sorts, groups, row_height, frozen_column_count, and the editor's settings.","type":"object"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.patchConfig","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.patchConfig.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.patchField","title":"Show, hide, resize or move a field in a view","description":"Shows, hides, resizes, moves or freezes one field in one view.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"fieldId":{"description":"The field's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-index-numbers":true,"x-khp-types":["Field"]},"frozen":{"type":"boolean"},"position":{"type":"integer"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]},"visible":{"type":"boolean"},"width":{"type":"integer"}},"required":["tableId","viewId","fieldId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"One field's settings in one view.","properties":{"field_id":{"description":"The field's id.","type":"integer"},"frozen":{"description":"Kept in view while scrolling sideways.","type":"boolean"},"position":{"description":"Its position in the view.","type":"integer"},"view_id":{"description":"The view's id.","type":"integer"},"visible":{"description":"Shown in the view.","type":"boolean"},"width":{"description":"Its column width in pixels, 40 to 1200.","type":"integer"}},"type":"object"}},"type":"object"},"targets":{"param":"fieldId","takes":"one id"},"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.patchField","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.patchField.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.putFilterTree","title":"Set a view's filter","description":"Replaces a view's filter conditions with a tree of and/or groups of field conditions.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"tree":{"additionalProperties":false,"properties":{"children":{"items":{"additionalProperties":false,"properties":{"condition":{"additionalProperties":false,"properties":{"field_id":{"default":0,"oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]},"operator":{"default":"","type":"string"},"value":{}},"type":"object"},"group":{"additionalProperties":false,"properties":{"children":{"items":{},"type":"array"},"conjunction":{"default":"","type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"conjunction":{"default":"","type":"string"}},"type":"object"},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"required":["tableId","viewId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The view's filter.","properties":{"tree":{"description":"A group of conditions.","oneOf":[{"additionalProperties":true,"description":"A group of conditions.","properties":{"children":{"items":{"additionalProperties":true,"description":"A condition or a nested group.","properties":{"condition":{"additionalProperties":true,"description":"A field condition.","properties":{"field_id":{"description":"The field's id.","type":"integer"},"operator":{"description":"The comparison, such as eq, neq, contains, is_empty or is_not_empty.","type":"string"},"value":{"description":"The value to compare with."}},"type":"object"},"group":{"additionalProperties":true,"description":"A group of conditions.","properties":{"children":{"items":{"additionalProperties":true,"description":"A condition or a nested group.","properties":{"condition":{"additionalProperties":true,"description":"A field condition.","properties":{"field_id":{"description":"The field's id.","type":"integer"},"operator":{"description":"The comparison, such as eq, neq, contains, is_empty or is_not_empty.","type":"string"},"value":{"description":"The value to compare with."}},"type":"object"},"group":{"description":"A nested group, as this one."}},"type":"object"},"type":"array"},"conjunction":{"description":"Whether all children or any child must hold.","enum":["and","or"],"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"conjunction":{"description":"Whether all children or any child must hold.","enum":["and","or"],"type":"string"}},"type":"object"},{"type":"null"}]}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.putFilterTree","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.putFilterTree.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.putGroups","title":"Set a view's groups","description":"Replaces how a view groups its records with a list of fields and directions.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"items":{"items":{"additionalProperties":false,"properties":{"direction":{"default":"","type":"string"},"field_id":{"default":0,"oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]}},"type":"object"},"type":"array"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"required":["tableId","viewId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The fields, first to last.","properties":{"items":{"items":{"additionalProperties":true,"description":"One field.","properties":{"direction":{"description":"Ascending or descending.","enum":["asc","desc"],"type":"string"},"field_id":{"description":"The field's id.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.putGroups","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.putGroups.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.putSorts","title":"Set a view's sorts","description":"Replaces a view's sort order with a list of fields and directions.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"items":{"items":{"additionalProperties":false,"properties":{"direction":{"default":"","type":"string"},"field_id":{"default":0,"oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-role":"object","x-khp-types":["Field"]}},"type":"object"},"type":"array"},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"required":["tableId","viewId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"The fields, first to last.","properties":{"items":{"items":{"additionalProperties":true,"description":"One field.","properties":{"direction":{"description":"Ascending or descending.","enum":["asc","desc"],"type":"string"},"field_id":{"description":"The field's id.","type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.putSorts","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.putSorts.md"}
{"kit":"table","kit_name":"Table","kit_version":"0.4.0","id":"table.views.update","title":"Update a view","description":"Renames a view, changes its type, or replaces its configuration.","mutates":true,"tool":"table_run","params":{"additionalProperties":false,"properties":{"asOrigin":{"description":"system:<name> writes as a host feature, outside the undo history. Agents leave it out.","type":"string"},"config":{"description":"The view's configuration object."},"tableId":{"description":"The table's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["Table"]},"title":{"type":"string"},"type":{"description":"The view's type (default grid).\ngrid: Rows and columns.\nkanban: Cards in columns, one per choice of a single_select field (config group_field_name, else the first single_select) or per checkbox value.\ncalendar: Records placed on the table's first date or datetime field.\ngallery: Cards with a cover picture (config cover_field_name, else the first attachment or url field).","enum":["grid","kanban","calendar","gallery"],"type":"string"},"viewId":{"description":"The view's id.","oneOf":[{"type":"integer"},{"type":"string"}],"x-khp-types":["View"]}},"required":["tableId","viewId"],"type":"object"},"result":{"additionalProperties":false,"description":"The request's own answer is in `result`, beside `change`: what the call changed in the document (null when nothing changed). A failed call answers `error` instead (A18).","properties":{"change":{"description":"What the call changed, or null.","oneOf":[{"additionalProperties":false,"description":"What one projection changed in the relational tables, by integer id. Every list is sorted and\nholds no repeats.","properties":{"dashboards":{"description":"A dashboard, or the base's list of them, changed.","type":"boolean"},"documentId":{"type":"string"},"origin":{"description":"Who wrote it: kind:principal, or a system origin's label.","type":"string"},"recordsDeleted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"recordsReordered":{"description":"Tables whose records' positions changed.","items":{"type":"integer"},"type":"array"},"recordsUpserted":{"description":"[tableId, rowKey] pairs.","items":{"items":{},"type":"array"},"type":"array"},"schema":{"description":"Tables whose fields were added, removed, updated, or reordered.","items":{"type":"integer"},"type":"array"},"tables":{"description":"Tables whose own row changed: created, deleted, renamed, moved, or given a new primary\nfield.","items":{"type":"integer"},"type":"array"},"views":{"description":"Views created, deleted, updated, or reordered, or whose column widths or visibility\nchanged.","items":{"type":"integer"},"type":"array"}},"required":["tables","schema","views","recordsReordered","dashboards"],"type":"object"},{"type":"null"}]},"error":{"additionalProperties":false,"description":"Why the call failed (A18); the file is as it was.","properties":{"code":{"enum":["invalid-params","invalid-op","invalid-value","not-found","read-only","unknown-command","command-failed","not-open","draft-required","not-allowed","unsupported","unavailable","failed"],"type":"string"},"index":{"description":"The failing step or operation.","type":"integer"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message"],"type":"object"},"result":{"additionalProperties":true,"description":"A view of a table.","properties":{"config":{"additionalProperties":true,"description":"Its filters, sorts, groups and display settings.","type":"object"},"created_at":{"description":"When it was created, in Unix milliseconds.","type":"integer"},"document_id":{"description":"Always 1: the document's id.","type":"integer"},"id":{"description":"The view's local projection address (viewId).","type":"integer"},"locked":{"description":"The view is locked against changes in the editor.","type":"boolean"},"order":{"description":"Its position among the table's views, from 1.","type":"integer"},"table_id":{"description":"The table's id.","type":"integer"},"title":{"description":"The view's title.","type":"string"},"tool_id":{"description":"The stable UUID accepted by viewId and used by receipts and conflicts.","type":"string"},"type":{"description":"The view type.","enum":["grid","kanban","calendar","gallery"],"type":"string"},"updated_at":{"description":"When it last changed, in Unix milliseconds.","type":"integer"},"user_id":{"description":"Always 0: the document's own user.","type":"integer"}},"type":"object"}},"type":"object"},"targets":null,"url":"https://developer.kition.ai/docs/kits/table/commands/table.views.update","markdown":"https://developer.kition.ai/docs/kits/table/commands/table.views.update.md"}
