# Goldnat for Drupal

A native Drupal module with services architecture, dependency injection, and config management. Lets AI agents securely search nodes, read content, and query comments — all respecting your Drupal permissions.

- Platform: Drupal
- Edition: free
- Web page: https://plugins.goldnat.ai/drupal/drupal-module
- Installation guide: https://plugins.goldnat.ai/drupal/guide

## What it does

- **Drupal Services Architecture** — Built as a proper Drupal service with dependency injection, config management, and Twig templates. No workarounds needed.
- **Servio Protocol** — Built on the Servio Protocol standard for tool-use AI agents. Provides a manifest endpoint, tool discovery, and structured JSON responses that AI platforms understand natively.
- **Pre-configured AI Clients** — Ships with built-in OAuth client configurations for ChatGPT, Claude, Copilot, Gemini, Grok, DeepSeek, and Perplexity. Connect in minutes, not hours.
- **Built for Drupal 9/10/11** — Native Drupal module with proper .info.yml, routing.yml, services.yml, and config schema. Installs via drush or the admin panel.
- **Secure by design** — Industry-standard OAuth flow with PKCE. Every AI agent authenticates with proof-of-key exchange — no secrets stored client-side.
- **Native permissions** — Tool calls respect the platform's native permission model. Users only see content they're allowed to access.
- **Servio Protocol** — Manifest endpoint, tool discovery, structured JSON responses. Compatible with the Model Context Protocol standard.
- **Production ready** — Structured tool calls ready for production use on your platform.

## What you can ask the agent

- "Find the articles about the annual report." — The agent searches your Drupal content and lists the nodes.
- "Create a draft news item from this text." — It creates the node as unpublished so you can review it.
- "Which media files are not used anywhere?" — It lists unused media in the library.
- "Show me the last three revisions of the About page." — It lists the revisions and can show their content.
- "How many submissions did the contact webform get?" — It counts the webform submissions.
- "Set the default meta description for articles." — It updates the Metatag default.

## Install and connect

1. Download Goldnat for Drupal from goldnat.ai and upload it in your Drupal admin panel.
2. Connect your AI agent: in goldnat.ai (or another compatible agent) add your site address. You are sent to your own Drupal site to log in and approve what the agent may do (read only, or read and write).
3. Ask the agent in plain language. It calls the plugin on your site as you, and shows you the result.
4. Full installation guide with screenshots: https://plugins.goldnat.ai/drupal/guide

## What the agent can and cannot do

- The agent acts as the Drupal user who connected it. It can never see or change more than that user can.
- You approve the access level when you connect (read only, or read and write), and you can revoke the connection at any time from the plugin page in your admin panel.
- Actions that delete content or cannot be undone ask for an explicit confirmation first.
- Your content stays on your site. The plugin answers the agent's requests directly; it does not copy your site anywhere else.

## Tools

Each tool is called by the agent by name. "write" tools need write access approved at connection.

- `drupal.downloadFile` (read) — Get a direct download URL or binary content for a file by file ID. Returns authenticated URL and file metadata.
- `drupal.executeView` (read) — Run a view and return its actual results — the rendered rows, not just its configuration.
- `drupal.getContentStats` (read) — Count published nodes within a calendar day range (local dates + IANA timezone); optional bundle filter narrows to one content type. Read-only.
- `drupal.getContentTypes` (read) — List all available content types (node bundles) with their machine names, labels, descriptions, and field configurations.
- `drupal.getImageStyles` (read) — Get all configured image styles (responsive derivatives) for a specific media image, including thumbnail, medium, large, and custom styles. Returns URLs for each style with dimensions. Essential for responsive image delivery.
- `drupal.getMedia` (read) — Get media entity details by media ID, including media type (image/video/document), source file, alt text, and usage references.
- `drupal.getMediaDownloadUrl` (read) — Get a direct download URL for a media file. Returns both public and private file URLs with appropriate access tokens for private files. Use this to retrieve the actual binary content of images, videos, documents, and audio files.
- `drupal.getMediaFieldValues` (read) — Get all custom field values for a media item, including taxonomy terms, entity references, text fields, and computed fields. Returns structured data with field machine names, labels, and formatted values.
- `drupal.getMediaUsage` (read) — Get a complete list of all places where a specific media item is used across the site, including node IDs, entity types, field names, and URLs. Essential for understanding impact before deletion or modification.
- `drupal.getMenuItems` (read) — Get menu structure and items for a specific menu by menu ID, including titles, links, parent-child relationships, and weights.
- `drupal.getNodeAttachments` (read) — List all file and media attachments for a node, including file IDs, names, types, sizes, and URLs.
- `drupal.getNodeRevisionContent` (read) — Get the full content of a specific node revision by revision ID, including all fields, body, and metadata as they existed in that version.
- `drupal.getNodeRevisions` (read) — List all revisions for a specific node, including revision IDs, creation dates, authors, and revision log messages.
- `drupal.getTaxonomyTerm` (read) — Get a single taxonomy term by ID, including name, description, vocabulary, parent terms, and hierarchy depth.
- `drupal.getUser` (read) — Get user profile by user ID, including username, email, roles, creation date, last login, status, and custom profile fields.
- `drupal.getView` (read) — Execute a Drupal View and get results by view ID and display ID, with optional filters and arguments. Returns structured data as configured in the view.
- `drupal.getVocabularies` (read) — List all taxonomy vocabularies (content categorization systems), including vocabulary IDs, names, descriptions, and term counts.
- `drupal.listMediaLibrary` (read) — List all media items in the media library with pagination, sorted by upload date, name, or usage count. Supports filtering by media type (image/video/document/audio) and collection/folder. Returns thumbnail URLs and basic metadata for each item.
- `drupal.listMediaTypes` (read) — List all configured media types (bundles) on the site with their field definitions, allowed file extensions, upload size limits, and configured image styles or video transcoders. Useful for understanding what types of media can be uploaded.
- `drupal.listUnusedMedia` (read) — List all media items that are not currently referenced by any content entity. Useful for cleanup operations and identifying orphaned files that can be safely deleted. Returns media IDs, names, file sizes, and upload dates.
- `drupal.listViews` (read) — List the views configured on the site, with their displays and status.
- `drupal.searchMedia` (read) — Search media library by name, type, MIME type, or upload date. Returns media IDs, names, types, thumbnails, and file references.
- `drupal.searchMediaByTag` (read) — Search media items by taxonomy tags or categories. Supports multiple tags with AND/OR logic. Returns matching media with thumbnails and usage statistics. Essential for organizing large media libraries.
- `drupal.searchTaxonomyTerms` (read) — Search taxonomy terms by name, vocabulary, parent term, or hierarchy level. Returns term IDs, names, descriptions, and relationships.
- `drupal.searchUsers` (read) — Search users by username, email, role, status (active/blocked), or registration date. Returns user IDs, names, emails, and roles.
- `drupal.createComment` (write) — Post a new comment on a content node (auto-detects the comment field per content type)
- `drupal.createNode` (write) — Create a new content node (article, page, or any content type)
- `drupal.deleteComment` (delete) — Permanently delete a comment
- `drupal.deleteNode` (delete) — Permanently delete a content node
- `drupal.getComment` (read) — Returns a single comment by ID.
- `drupal.getCurrentUser` (read) — Returns the currently authenticated user.
- `drupal.getNode` (read) — Returns a single content node by ID.
- `drupal.publishNode` (write) — Publish or unpublish a content node
- `drupal.searchComments` (read) — Searches comments by keywords.
- `drupal.searchNodes` (read) — Searches content nodes by keywords and type.
- `drupal.updateComment` (write) — Update the body of an existing comment
- `drupal.updateNode` (write) — Update an existing content node's title or body
- `entity.countEntities` (read) — 
- `entity.getEntity` (read) — 
- `entity.listEntityTypes` (read) — 
- `entity.queryEntities` (read) — 
- `drupal.uploadFile` (write) — Upload a new file from base64-encoded content (max 10 MB), for use as a media source
- `drupal.createMedia` (write) — Create a media library item from an uploaded file or a remote source URL
- `drupal.deleteMedia` (delete) — Delete a media item (the underlying file is left in place)
- `drupal.updateMedia` (write) — Update a media item's name or source
- `metatag.getEntityMetatags` (read) — 
- `metatag.getMetatagDefaults` (read) — 
- `metatag.listMetatagDefaults` (read) — 
- `metatag.listMetatagTags` (read) — 
- `metatag.setMetatagDefault` (write) — 
- `paragraphs.createParagraphType` (write) — 
- `paragraphs.getParagraph` (read) — 
- `paragraphs.getParagraphsForEntity` (read) — 
- `paragraphs.getParagraphType` (read) — 
- `paragraphs.listParagraphTypes` (read) — 
- `drupal.createMenuLink` (write) — Add a new link to a menu (internal path or external URL); requires administer menu permission
- `drupal.deleteMenuLink` (delete) — Permanently delete a custom menu link
- `drupal.updateMenuLink` (write) — Update an existing custom menu link
- `drupal.createTaxonomyTerm` (write) — Create a new taxonomy term in a vocabulary, optionally hierarchical
- `drupal.deleteTaxonomyTerm` (delete) — Permanently delete a taxonomy term
- `drupal.updateTaxonomyTerm` (write) — Update an existing taxonomy term's name or description
- `drupal.blockUser` (write) — Block a user account, preventing login (the primary uid=1 administrator cannot be blocked)
- `drupal.createUser` (write) — Create a new user account, auto-generating a password if none is given
- `drupal.unblockUser` (write) — Unblock a previously blocked user account
- `drupal.updateUser` (write) — Update a user account's email, password, or role assignments
- `webform.countSubmissions` (read) — 
- `webform.createWebform` (write) — 
- `webform.deleteSubmission` (write) — 
- `webform.getSubmission` (read) — 
- `webform.getSubmissions` (read) — 
- `webform.getWebform` (read) — 
- `webform.getWebformElements` (read) — 
- `webform.listWebforms` (read) — 
- `webform.updateWebformSettings` (write) — 

## Frequently asked questions

**Which AI agents can I use?**

Our own agent at goldnat.ai, and other AI agents that support the Servio protocol. The list of compatible clients is on this page.

**Can the AI see or change things I can't?**

No. It works as the Drupal user who connected it, with exactly that user's permissions. Connect it with an account that has only the access you want it to have.

**Will it change things without asking?**

Only if you approved write access when you connected it. Deleting or irreversible actions ask for an explicit confirmation.

**How do I disconnect an agent?**

Revoke its connection from the plugin page in your admin panel. The agent loses access immediately.
