Docs › Slima MCP › Query book schema with the resource

Query book schema with the resource

Last updated September 9, 2026 · 8 min read

MCP isn't only tools — it has resources too. The schema resource is a key one: tells AI a book's exact permissions.

Slima Authorized Apps: MCP clients querying schema resource for precise permissions appear here

How to use

Resource URI: slima://books/{book_token}/schema

MCP-capable clients can read resources directly — no tool call needed.

# Pseudo-code (depends on the client's resource API)
schema = read_resource("slima://books/bk_xxx/schema")

What it returns

{
  "book_token": "bk_xxx",
  "book_type": "script",
  "studio_label": "Script Studio",
  "mcp_capabilities": {
    "readable_paths": "Any path within the book tree ...",
    "writable_paths": [".script_studio/planning/**/*"],
    "writable_exceptions": [".script_studio/planning/.initialized"],
    "readonly_paths": [
      ".script_studio/series.json",
      ".script_studio/seasons/**/season.json",
      ".script_studio/seasons/**/episodes/**/episode.json",
      ".script_studio/seasons/**/scenes/*.scene",
      ".script_studio/characters/**/*.character",
      ".script_studio/locations/**/*.location",
      ".script_studio/storylines/**/*.storyline",
      ".script_studio/notes/**/*.note",
      ".script_studio/planning/.initialized"
    ],
    "write_access_note": "..."
  },
  "ai_file_policy": {
    "writable": [".md", ".markdown", ".txt"],
    "field_level_tools": {
      ".beats": "update_beat_board",
      ".timeline": "update_timeline",
      ".script": "update_script",
      ".map": "update_relationship_map",
      ".geomap": "update_world_map"
    },
    "readonly": [".character", ".location", ".json", ".yaml", ".yml"],
    "authority": "get_capabilities"
  },
  "structured_file_types": { "*.scene": "...", "*.character": "..." },
  "policy_source": "Rails: Mcp::FileOperationService#validate_studio_write_path!"
}

Why this resource exists

Writing a *.scene will fail (400) — but calling schema first lets you know in advance the path is read-only, no wasted API call.

Recommended AI workflow

1. list_books → get book_token
2. read_resource(slima://books/{token}/schema) → get rules
3. Plan reads / writes safely given the rules
4. Execute

Some MCP-capable clients auto-expand resources to the AI — the AI doesn't need to explicitly call.

Writing Studio book schema

{
  "book_token": "bk_xxx",
  "book_type": "book",
  "studio_label": "Writing Studio",
  "mcp_capabilities": {
    "writable_paths": ["**/*"],
    "readonly_paths": []
  },
  "ai_file_policy": {
    "writable": [".md", ".markdown", ".txt"],
    "field_level_tools": {
      ".beats": "update_beat_board",
      ".timeline": "update_timeline",
      ".script": "update_script",
      ".map": "update_relationship_map",
      ".geomap": "update_world_map"
    },
    "readonly": [".character", ".location", ".json", ".yaml", ".yml"],
    "authority": "get_capabilities"
  },
  "structured_file_types": {}
}

Paths and file types are two different questions. Do not read them as one.

mcp_capabilities answers the path question: in a Writing Studio book every path is writable.

ai_file_policy answers the type question, and it applies to both studios. The generic write tools (write_file, edit_file, append_to_file, delete_file) take prose only — .md, .markdown, .txt. The five types under field_level_tools are edited one field at a time through the tool named there; a whole-document write is refused, because it drops the parts of the file the model was never shown. Writing those needs a paid plan; reading them does not. The types under readonly cannot be written at all.

create_file is the exception worth remembering: on a structured type it writes an empty document of the right shape and ignores the content you send, so you create first and fill it in with the tool.

This block ships with the client and can lag a server deploy. When the two disagree, get_capabilities is right — that is what the authority field is saying.

Related

Try it in Slima

Open the app and do this with your own book. Free to start, no credit card.

Open Slima
Was this helpful?