Text

Direct text resources embedded in your configuration.

Text resources allow you to define static, in-memory content directly within your configuration file. They are ideal for embedding reference tables, schemas, documentation notes, lookup dictionaries, or configuration data that should be supplied to an LLM or client as read-only context.

Examples

Basic Text Resource

Here is an example of a minimal text resource. If uri is omitted, Toolbox automatically defaults to text://{name}.

kind: resource
name: country_codes
type: text
description: "ISO standard country codes and country names."
text: |
  US: United States
  CA: Canada
  GB: United Kingdom
  DE: Germany
  JP: Japan

Custom URI and Markdown MIME Type

You can specify a custom URI scheme (such as docs://) and define a specific MIME type like text/markdown:

kind: resource
name: architecture_doc
type: text
title: "System Architecture"
description: "High-level overview of our microservices architecture."
uri: "docs://architecture/overview"
mimeType: "text/markdown"
text: |
  # System Architecture Overview
  
  - **API Gateway**: Handles incoming client traffic and routing.
  - **Auth Service**: Issues and validates OAuth tokens.
  - **Data Service**: Interfaces with PostgreSQL and BigQuery storage.

Resource with Annotations

You can attach annotations to specify audience and priority for MCP clients:

kind: resource
name: order_status_codes
type: text
title: "Order Status Codes"
description: "Valid order status codes and definitions."
uri: "schema://orders/status-codes"
mimeType: "text/plain"
text: |
  PENDING   - Order created, awaiting payment confirmation.
  CONFIRMED - Payment authorized, order queued for fulfillment.
  SHIPPED   - Order dispatched with carrier tracking number.
  DELIVERED - Package received by customer.
  CANCELLED - Order cancelled prior to shipment.
annotations:
  priority: 0.8
  audience:
    - assistant

Reference

Text Resource Schema

fieldtyperequireddescription
namestringYesUnique name for the resource.
typestringYesMust be "text".
textstringYesThe text content of the resource.
uristringNoUnique URI identifying the resource. Defaults to text://{name} if omitted.
descriptionstringNoA brief explanation of the resource’s purpose.
titlestringNoHuman-readable title for client display.
mimeTypestringNoMIME type of the text content. Defaults to text/plain.
annotationsAnnotationsNoMetadata annotations (priority, audience, lastModified).

Behaviors

  • Default URI Generation: When uri is not specified, Toolbox generates text://{name}. All resource URIs on the server must be globally unique across all resources and templates.
  • Computed Size: When queried via resources/list, the size field is automatically calculated as the byte length of the UTF-8 text string.



Last modified September 25, 2026: chore(main): release 1.13.1 (#4138) (e14cda6)