> For the complete documentation index, see [llms.txt](https://mcp.conserver.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mcp.conserver.io/optimization/thread-context-bootstrap.md).

# Thread context bootstrap

Use this file at the start of an optimization thread. It summarizes decisions, behavior, and where assets live.

## Purpose vs type (attachments)

* **`attachment.purpose`** is the **canonical** spec-facing classification field for attachments.
* **`attachment.type`** is **legacy / compatibility only** (e.g. older data, Strolid-style metadata). Do not treat it as equivalent to `purpose` for new designs.
* **`analysis.type`** remains the correct classification field for analysis (unchanged).

### Read / discovery order (preferred)

1. Discover attachment purposes: `vcon://v1/discovery/attachments/purposes` or `GET /api/v1/discovery/attachments/purposes`
2. Discover analysis types: `vcon://v1/discovery/analysis/types` or `GET /api/v1/discovery/analysis/types`
3. Read attachments by purpose: `vcon://v1/vcons/{uuid}/attachments/purpose/{purpose}` or `GET /api/v1/vcons/:uuid/attachments?purpose=...`
4. Read analysis by type: `vcon://v1/vcons/{uuid}/analysis/type/{type}` or `GET /api/v1/vcons/:uuid/analysis?type=...`

### Legacy-only attachment paths

* `vcon://v1/discovery/attachments/types` / `GET /api/v1/discovery/attachments/types`
* `vcon://v1/vcons/{uuid}/attachments/type/{type}` / `GET /api/v1/vcons/:uuid/attachments?type=...`

### Tags

* Do **not** jump to tags first for dealer-like, summary-like, transcript-like, or other attachment/analysis-backed data.
* Use tags only when classification **actually** lives in the tags attachment.

## Contract tools (recommended for agents)

Prefer: `vcon_capabilities`, `vcon_taxonomy`, `vcon_search`, `vcon_fetch`, `describe_response_shape`.

Payload discipline: `include`, `limit`, pagination, metadata-only shapes, `max_response_bytes`; on `RESPONSE_TOO_LARGE`, shrink and retry.

## Spec reminders (high signal)

* `analysis.vendor` required; `analysis.schema` not `schema_version`; `body` as string when structured JSON is stored.
* `mediatype` not `mimetype`; `critical` not `must_support`; `amended` not `appended`.

## Code / docs touchpoints (for optimization work)

* Types: `src/types/vcon.ts` (`Attachment.purpose` vs optional `type`).
* MCP resources: `src/resources/index.ts` (discovery + filtered reads; purpose-first descriptions).
* REST: `src/api/routes/discovery.ts`, `src/api/routes/vcons.ts`, mount in `src/api/rest-router.ts`.
* Shared filters: `src/utils/read-surfaces.ts`.
* Query layer: `src/db/interfaces.ts`, `src/db/queries.ts`, `src/db/mongo-queries.ts` (distinct discovery + Supabase `purpose` round-trip on attachments).
* Tool schema: `src/tools/vcon-crud.ts` (`AttachmentSchema` documents purpose vs type).
* Tests: `tests/new-tools-resources.test.ts`, `tests/api/routes/discovery.test.ts`, `tests/api/routes/vcons.test.ts`, `tests/db-queries.test.ts`, `tests/api/helpers.ts`.

## Documentation assets (system instructions)

Full copy-paste variants live in:

* `docs/examples/system-instruction-assets.md` (long, short, CLAUDE.md one-paragraph, strict policy-style)

Linked from:

* `docs/examples/index.md`
* `docs/SUMMARY.md`

## Verification notes

* `npm run build` and targeted Vitest suites were used during implementation.
* `npm run docs:build` succeeded after adding the system-instruction assets page.

***

*This file is intentionally dense so a new thread can load one artifact instead of replaying the whole conversation.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mcp.conserver.io/optimization/thread-context-bootstrap.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
