# Tool reference

Look up each MCP tool by name, permission, accepted inputs and returned fields.

Call `tools/list` after authorization for the schemas your connection can use. The eight author scopes expose 15 tools together. The sixteenth tool requires explicit administrator access. Each successful tool returns JSON in both `structuredContent` and a text content block.

## Public discovery

### search_guides

Requires `guides:read`. Supply any combination of `query`, `topic`, `limit` and `after`. An empty request lists published guides. Search uses the first eight distinct words in `query`. Each word must occur in the title, summary or topics, or the full search phrase must match part of a topic. Adding `topic` narrows either match to guides tagged with that normalized slug. Results include `guides` with IDs and canonical URLs, plus `nextCursor`. For another page, pass that cursor as `after` and keep the filters unchanged. The default limit is 20 and maximum is 50.

```json
{"query":"accessible CSS transitions","limit":5}
```

### read_guide

Requires `guides:read`. Supply exactly one UUID (`id`) or canonical `path` such as `/jordan/accessible-css-transitions-disclosure-reduced-motion`. Returns the exact stored `bodyMarkdown`, title, summary, topics, banner, AI-assisted flag, author handle, URL, revision and timestamps.

### public_stats

Requires `guides:read`. Pass `{}`. Returns `publishedGuides`, `publishedAuthors`, `representedTopics` and `observedAt` for the public catalog.

## Unpublished drafts

### list_drafts

Requires `drafts:read`. Pass optional `offset` (default 0) and `limit` (default 20, maximum 50). Returns `drafts` with IDs, metadata, revisions and Studio edit links for the connected author. Pass `nextOffset` to continue while it has a value.

### read_draft

Requires `drafts:read`. Pass `id`. Returns the unpublished draft’s `bodyMarkdown`, metadata, `revision` and `editUrl`.

### create_draft

Requires `drafts:write`. Requires a fresh UUID `idempotencyKey`, `title` and `bodyMarkdown`. Optional fields are `topics`, `slug`, `summary`, `banner` and `aiAssisted`. See [field limits](https://www.devguides.com/docs/authoring#choose-the-guide-fields). Returns `id`, `revision` and `editUrl`. Retry a lost response with the original key and identical fields.

### update_draft

Requires `drafts:write`. Pass `id`, `expectedRevision` and the [guide fields](https://www.devguides.com/docs/authoring#choose-the-guide-fields) to change. A supplied body replaces the existing body. Returns the saved `revision`, `id` and `editUrl`. A stale revision produces a conflict.

## Media

### begin_media_upload

Requires `media:upload`. Pass `contentType` and a positive integer `size` in bytes. Supports PNG, JPEG and WebP up to 3 MiB and MP4 or WebM up to 10 MiB. Returns `uploadUrl`, `method`, `headers`, `path` and `expiresAt`. HTTP PUT the bytes using those headers. [Upload workflow](https://www.devguides.com/docs/media)

### finish_media_upload

Requires `media:upload`. Pass the `path` from the successful upload. Returns a stable `url` and `markdown`. Images also return `banner`. You can repeat a successful finish if its response is lost.

## Publication and private revisions

### publish_draft

Requires `guides:publish`. Pass `id` and the reviewed draft’s `expectedRevision`. Returns the public `url`, `revision`, `id` and `publishedAt`. [Publish a draft](https://www.devguides.com/docs/publishing)

### list_guide_revisions

Requires `revisions:read`. Pass optional `offset` and `limit` (default 20, maximum 50). Returns the author’s published guides with pending private edits, newest save first, under `revisions` with `nextOffset` for pagination.

### read_guide_revision

Requires `revisions:read`. Pass the published guide’s `id`. Returns the editable Markdown and metadata, `publicSlug`, `revision`, `baseRevision`, `hasPendingChanges` and `editUrl`. Before a private working copy exists this reads the current publication.

### save_guide_revision

Requires `revisions:write`. Pass `id`, `expectedRevision` and changed guide fields. Saves a private working copy while the public page continues to serve its previous release. Returns `id`, `revision` and `editUrl`.

### publish_guide_revision

Requires `revisions:read` and `guides:publish` together. Pass `id` and the approved private copy’s `expectedRevision`. Returns the released `revision`, `id`, `publishedAt` and canonical `url`. Publishing shares the author’s [rolling-hour allowance](https://www.devguides.com/docs/publishing#publication-limits) with Studio.

## Analytics

### author_analytics

Requires `analytics:author`. Pass `{}` to aggregate across your published guides, or include a published `guideId` that you own. Returns publication count, lifetime views, seven-day views, aggregate reading depth and the observation timestamp. [Reading-depth definitions](https://www.devguides.com/docs/analytics#measure-your-publications)

### system_analytics

Requires `analytics:system`. Available to a DevGuides administrator who explicitly grants the scope. Pass `{}` for catalog totals, new publications in the last seven UTC dates, lifetime and seven-day views, and `observedAt`.
