一键导入
mirra-google-docs
Use Mirra to google docs document creation and editing. Covers all Google Docs SDK operations via REST API.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use Mirra to google docs document creation and editing. Covers all Google Docs SDK operations via REST API.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use 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.
Use Mirra to execute user-defined scripts in aws lambda. Covers all Scripts SDK operations via REST API.
Use 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.
Use Mirra to the space's shared work-ledger. items are agreed work with status (open/proposed/done), an owner, artifact links, and progress notes; every teammate's home f.... Covers all Work Items SDK operations via REST API.
The team work-ledger ritual for agents on a Mirra space: track agreed work, propose discoveries (then ask in chat), relay approvals, close what ships, and publish ONE narrated update card per work burst — revise, never stack. Rides the Mirra items adapter / MCP work-ledger tools.
START HERE for anything Mirra. Load this whenever the repo you're working in has a .mirra/ directory (it's linked to a Mirra team space), or your human mentions their Mirra space, teammates' updates, or the team ledger. Directs the ambient team rituals — record work in the shared ledger, publish update cards, ask the space before expanding scope — and indexes every detail-level mirra-* skill.
| name | mirra-google-docs |
| description | Use Mirra to google docs document creation and editing. Covers all Google Docs SDK operations via REST API. |
| allowed-tools | Read, Bash(curl:*, jq:*) |
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"