/mirra:google-docsfrom mirra
Creates and edits Google Docs documents via the Mirra API. Supports text, headings, lists, tables, and content replacement. Requires OAuth connection and API key.
Ships in mirra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Google Docs document creation and editing
You need the user's API key. Ask for these if not provided:
API_KEY: Mirra API key (generated in Mirra app > Settings > API Keys)API_URL: Defaults to https://api.fxn.world (only ask if they mention a custom server)Note: Google Docs requires OAuth authentication. The user must have connected their Google Docs account in the Mirra app before these operations will work.
All operations use a single POST endpoint with the resource ID and method in the body:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{
"resourceId": "google-docs",
"method": "{operation}",
"params": { ...args }
}' | jq .
Replace {operation} with the operation name from the table below.
Legacy alternative:
POST ${API_URL}/api/sdk/v1/googleDocs/{operation}with args as the request body also works but is not recommended for new integrations.
| Operation | Description |
|---|---|
createDocument | Create a new Google Doc |
getDocument | Get a Google Doc by ID. Returns normalized flat structure with extracted fields. |
appendText | Append text to the end of a document |
replaceText | Replace text in a document |
getDocumentContent | Get the text content of a Google Doc |
insertTextAtPosition | Insert text at a specific position in the document |
insertTextAfter | Insert text after a search string in the document |
insertHeading | Insert a heading into the document |
insertList | Insert a bulleted or numbered list into the document |
insertTable | Insert a table into the document |
updateDocumentContent | Replace the entire content of a document |
createSection | Create a new section with a heading and content. Returns normalized result with insertion details. |
findInsertionPoint | Find the character position for insertion based on position or search text. Returns normalized re... |
createDocumentCreate a new Google Doc
Arguments:
title (string, required): Title of the documentReturns:
AdapterOperationResult: Created document with documentId and title
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"createDocument","params":{"title":"My New Document"}}' | jq .
Example response:
{
"documentId": "1abc123XYZ",
"title": "My New Document"
}
getDocumentGet a Google Doc by ID. Returns normalized flat structure with extracted fields.
Arguments:
documentId (string, required): ID of the documentReturns:
AdapterOperationResult: Normalized document with documentId, title, body, url, hasContent fields
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"getDocument","params":{"documentId":"1abc123XYZ"}}' | jq .
Example response:
{
"documentId": "1abc123XYZ",
"title": "My Document",
"revisionId": "rev_123",
"body": "Document text content here...",
"bodyLength": 28,
"url": "https://docs.google.com/document/d/1abc123XYZ/edit",
"hasContent": true
}
appendTextAppend text to the end of a document
Arguments:
documentId (string, required): ID of the documenttext (string, required): Text to appendReturns:
AdapterOperationResult: Append operation result
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"appendText","params":{"documentId":"<ID>","text":"<value>"}}' | jq .
replaceTextReplace text in a document
Arguments:
documentId (string, required): ID of the documentsearchText (string, required): Text to search forreplaceText (string, required): Text to replace withReturns:
AdapterOperationResult: Replace operation result
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"replaceText","params":{"documentId":"<ID>","searchText":"<value>","replaceText":"<value>"}}' | jq .
getDocumentContentGet the text content of a Google Doc
Arguments:
documentId (string, required): ID of the documentReturns:
AdapterOperationResult: Document text content
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"getDocumentContent","params":{"documentId":"<ID>"}}' | jq .
insertTextAtPositionInsert text at a specific position in the document
Arguments:
documentId (string, required): ID of the documenttext (string, required): Text to insertposition (number, required): Character position to insert at (1-indexed)Returns:
AdapterOperationResult: Insert operation result
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"insertTextAtPosition","params":{"documentId":"<ID>","text":"<value>","position":10}}' | jq .
insertTextAfterInsert text after a search string in the document
Arguments:
documentId (string, required): ID of the documentsearchText (string, required): Text to search fortextToInsert (string, required): Text to insert after the search textoccurrence (number, optional): Which occurrence to insert after (default: 1)Returns:
AdapterOperationResult: Insert operation result
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"insertTextAfter","params":{"documentId":"<ID>","searchText":"<value>","textToInsert":"<value>"}}' | jq .
insertHeadingInsert a heading into the document
Arguments:
documentId (string, required): ID of the documenttext (string, required): Heading textlevel (number, required): Heading level (1-6)position (number, optional): Character position to insert atinsertAfterText (string, optional): Insert after this text instead of at positionReturns:
AdapterOperationResult: Insert operation result
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"insertHeading","params":{"documentId":"<ID>","text":"<value>","level":10}}' | jq .
insertListInsert a bulleted or numbered list into the document
Arguments:
documentId (string, required): ID of the documentitems (array, required): Array of list itemslistType (string, required): Type of list: "bulleted" or "numbered"position (number, optional): Character position to insert atinsertAfterText (string, optional): Insert after this text instead of at positionReturns:
AdapterOperationResult: Insert operation result
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"insertList","params":{"documentId":"<ID>","items":[],"listType":"<value>"}}' | jq .
insertTableInsert a table into the document
Arguments:
documentId (string, required): ID of the documentdata (array, required): 2D array of table data (rows x columns)hasHeader (boolean, optional): Whether the first row is a header (default: true)position (number, optional): Character position to insert atinsertAfterText (string, optional): Insert after this text instead of at positionReturns:
AdapterOperationResult: Insert operation result
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"insertTable","params":{"documentId":"<ID>","data":[]}}' | jq .
updateDocumentContentReplace the entire content of a document
Arguments:
documentId (string, required): ID of the documentnewContent (string, required): New content to replace existing contentReturns:
AdapterOperationResult: Update operation result
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"updateDocumentContent","params":{"documentId":"<ID>","newContent":"<value>"}}' | jq .
createSectionCreate a new section with a heading and content. Returns normalized result with insertion details.
Arguments:
documentId (string, required): ID of the documentheading (string, required): Section heading textcontent (string, required): Section content textReturns:
AdapterOperationResult: Normalized section result with documentId, title, url, heading, insertionIndex, success
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"createSection","params":{"documentId":"1abc123XYZ","heading":"New Section","content":"Section content here"}}' | jq .
Example response:
{
"documentId": "1abc123XYZ",
"title": "My Document",
"url": "https://docs.google.com/document/d/1abc123XYZ",
"heading": "New Section",
"insertionIndex": 156,
"success": true
}
findInsertionPointFind the character position for insertion based on position or search text. Returns normalized result with position and context.
Arguments:
documentId (string, required): ID of the documentposition (number, required): Position to find (1 for start, -1 for end)searchText (string, optional): Text to search for (returns position after this text)Returns:
AdapterOperationResult: Normalized insertion point with documentId, title, url, position, context, documentLength
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"google-docs","method":"findInsertionPoint","params":{"documentId":"1abc123XYZ","position":1,"searchText":"Introduction"}}' | jq .
Example response:
{
"documentId": "1abc123XYZ",
"title": "My Document",
"url": "https://docs.google.com/document/d/1abc123XYZ",
"position": 45,
"context": "...Introduction paragraph ends here...",
"documentLength": 1250
}
All SDK responses return the operation payload wrapped in a standard envelope:
{
"success": true,
"data": { ... }
}
The data field contains the operation result. Error responses include:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message"
}
}
jq . to pretty-print responses, jq .data to extract just the payloaddata.results or directly in data (check examples)--fail-with-body to curl to see error details on HTTP failuresexport API_KEY="your-key"What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
google-docs, document-creation, document-editing, mirra-api, rest-api
Other plugins' skills for the same job
npx claudepluginhub oz-networks/mirra-sdk --plugin mirra39 skills in this plugin
/aiUse Mirra to access ai services for chat, decisions, and streaming with multi-provider support. Covers all AI Services SDK operations via REST API./channelsUse Mirra to the places a space publishes to — its corporate x, blog, newsletter — and the drafted copy waiting to go out to them. use listchannels to see what this space.... Covers all Space Channels SDK operations via REST API./contactsUse Mirra to manage user contacts - list, add, remove, search, block, and unblock contacts. Covers all Contacts SDK operations via REST API./coworkCowork with another person's Claude Code over a shared Mirra group chat. Post questions, wait for replies in near-real-time (long-poll), and hand off follow-ups. Rides the Mirra Messaging adapter — no extra integration to install./cryptoUse Mirra to cryptocurrency price monitoring and token transfers. Covers all Crypto SDK operations via REST API./dashboardsUse Mirra to living dashboards — natively-rendered grids of typed widgets (stat, image_card, list, progress, sparkline) that flows keep current by pushing data into them..... Covers all Dashboards SDK operations via REST API.