{
  "schemaVersion": 3,
  "connection": "WebMCP (in-browser). When the signed-in user enables external agent access (Settings → AI; default off) and the document owner has AI enabled, the read-only tools below are registered on the page's model-context surface (document.modelContext, with navigator.modelContext as the pre-Chrome-150 fallback — a Chrome origin trial). An agent discovers and calls them in the same tab, same origin, same session. These tools exist only in the tab. A separate remote MCP server, https://graph-paper.io/mcp, has other tools that check a plot document and return a link; it cannot read or change a person's documents (see remoteMcpServer).",
  "preconditions": [
    "The signed-in user must explicitly enable external agent access (default off).",
    "Tools operate on the user's currently open document only.",
    "The document owner must have AI features enabled; otherwise all tools are unavailable.",
    "Read-only capabilities: these tools never modify the document or account."
  ],
  "tools": [
    {
      "name": "read_document",
      "description": "Read a section of the current document (section-scoped). Returns markdown for the requested section.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "section": {
            "type": "integer",
            "description": "Section number to read (1-based)."
          }
        },
        "required": [
          "section"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "evaluate_math",
      "description": "Evaluate a math expression through the notebook's own Compute Engine scope (definitions + history). Pure; no side effects.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "latex": {
            "type": "string",
            "maxLength": 2000,
            "description": "The expression to evaluate, in LaTeX."
          }
        },
        "required": [
          "latex"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "lookup_math_capability",
      "description": "Look up whether the Compute Engine can do something before you claim it. Pass a concept keyword (e.g. \"prime factorization\", \"eigenvalues\") or a LaTeX trigger (e.g. \"\\gcd\", \"\\int\"). Multiple keywords are OR-matched, so listing a few synonyms casts a wider net (e.g. \"modulo floor divide remainder\") rather than narrowing the search. The result lists matching registered operators, each with its canonical name and whether it is actually evaluable. Trust the result: if nothing evaluable matches, the capability is NOT available — say so rather than inventing a function.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 200,
            "description": "One or more concept keywords (OR-matched) or a LaTeX trigger to search for."
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "lookup_settings",
      "description": "Look up which app settings you can read or change, by keyword (e.g. \"theme\", \"angle\", \"export\"). Returns matching setting keys with their allowed values. Only whitelisted settings exist — if nothing matches, the setting cannot be read or changed; say so rather than claiming otherwise. Call this to learn setting keys before get_settings or set_setting.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "A keyword to match against setting keys and descriptions."
          }
        },
        "required": [
          "keyword"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "lookup_help",
      "description": "Search Graph Paper's product help — tips, commands, settings, and a product overview — for how the APPLICATION works. Consult it BEFORE answering any \"how do I…\" or \"can Graph Paper do…\" question rather than guessing from priors. Each match carries a kind and a title; attribute your answer using them. An explicit no-match result means the feature may not exist — say so plainly; never invent a menu, gesture, setting, or UI affordance.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 200,
            "description": "A product-feature question or keywords to search the help index for."
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      }
    }
  ],
  "remoteMcpServer": {
    "url": "https://graph-paper.io/mcp",
    "name": "io.graph-paper/graph-paper",
    "transport": "Streamable HTTP, stateless: one JSON-RPC message per POST; a request gets one JSON answer",
    "authentication": "none",
    "protocolVersions": [
      "2026-07-28",
      "2025-11-25",
      "2025-06-18",
      "2025-03-26"
    ],
    "documentation": "https://graph-paper.io/for-agents/en/#use-the-mcp-server",
    "note": "A remote server, separate from the in-browser WebMCP tools of this file. It needs no account and no browser tab, holds no user data, and cannot read or change a person's documents.",
    "tools": [
      {
        "name": "make_plot_link",
        "title": "Make a Graph Paper link",
        "description": "Check a Graph Paper plot document and return the link that opens it. The link opens the plot as an editable draft in Graph Paper (https://graph-paper.io); the reader needs no account. Give the document as a JSON object in the format of get_plot_format. If the document has errors, the result lists each one with the path of the field and what to change, and no link; fix them and call the tool again. Warnings name the keys that were ignored.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "document": {
              "type": "object",
              "description": "The plot document: a JSON object with at least \"title\" and \"series\". See get_plot_format and list_examples."
            }
          },
          "required": [
            "document"
          ],
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "ok": {
              "type": "boolean",
              "description": "True when the document is valid and url is given."
            },
            "url": {
              "type": "string",
              "description": "The link that opens the document."
            },
            "title": {
              "type": "string"
            },
            "dimension": {
              "type": "integer",
              "enum": [
                2,
                3
              ]
            },
            "category": {
              "type": "string",
              "enum": [
                "2d",
                "3d",
                "data"
              ]
            },
            "rows": {
              "type": "object",
              "description": "How many rows of each kind the document has.",
              "properties": {
                "series": {
                  "type": "integer"
                },
                "variables": {
                  "type": "integer"
                },
                "points": {
                  "type": "integer"
                },
                "definitions": {
                  "type": "integer"
                },
                "actions": {
                  "type": "integer"
                },
                "markers": {
                  "type": "integer"
                }
              }
            },
            "note": {
              "type": "string",
              "description": "With ok true: the formulas were not computed, and what to ask the person when a row does not work."
            },
            "errors": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "description": "The field, in JSON path notation such as \"series[0].fn\"; empty for the whole document."
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            },
            "warnings": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "description": "The field, in JSON path notation such as \"series[0].fn\"; empty for the whole document."
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ]
              }
            }
          },
          "required": [
            "ok",
            "warnings"
          ]
        },
        "annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        }
      },
      {
        "name": "get_plot_format",
        "title": "Read the plot document format",
        "description": "Return the reference of the Graph Paper plot document format, as Markdown: every field of a plot document, the series types, the limits, and complete examples. Give section to get one section only (a heading of the page, such as \"Variables\" or \"2D Series Types\"); an unknown section returns the list of headings. Read it before you write a document for make_plot_link.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "section": {
              "type": "string",
              "description": "A heading of the format page. Leave it out for the whole page."
            }
          },
          "additionalProperties": false
        },
        "annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        }
      },
      {
        "name": "list_examples",
        "title": "List example plot documents",
        "description": "Return the example plot documents of the Graph Paper format page, each with its title and its JSON. Each one is a valid document that make_plot_link accepts; start from the one closest to what you want.",
        "inputSchema": {
          "type": "object",
          "additionalProperties": false
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "examples": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The heading the example is under."
                  },
                  "document": {
                    "type": "object"
                  }
                },
                "required": [
                  "title",
                  "document"
                ]
              }
            }
          },
          "required": [
            "examples"
          ]
        },
        "annotations": {
          "readOnlyHint": true,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        }
      }
    ]
  }
}
