
Google Docs Connector
Available ActionsEach successful request consumes credits as outlined below.
Details
Comprehensive Google Docs management tool enabling AI agents to create edit format and share documents through OAuth authentication. Supports rich text formatting with bold italic underline strikethrough and custom fonts paragraph styling with alignment spacing and indentation table creation and manipulation image insertion from URLs headers footers and page breaks named ranges for bookmarking document export to multiple formats including PDF DOCX HTML and EPUB sharing and permission management and natural language document creation. Perfect for document automation report generation collaborative editing template creation and content management workflows.
Use Cases
document automation, report generation, template creation, collaborative editing, content management, proposal writing, meeting agenda creation, contract generation, documentation workflows, batch document processing
Connect Your Agent In 5 Min
Watch the setup guide for your platform
Or Install Locally
STDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections. This lightweight connector routes requests to https://api.agentpmt.com/mcp. All tool execution happens in the cloud and the server cannot edit any files on your computer.
npm install -g @agentpmt/mcp-routeragentpmt-setupcurl -X POST "https://api.agentpmt.com/products/purchase" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ********" \
-d '{
"product_id": "6962fd6f4cf4309309cac7b0",
"parameters": {
"action": "create_document",
"title": "example_title"
}
}'import requests
import json
url = "https://api.agentpmt.com/products/purchase"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
}
data = {
"product_id": "6962fd6f4cf4309309cac7b0",
"parameters": {
"action": "create_document",
"title": "example_title"
}
}
response = requests.post(url, headers=headers, json=data)
print(response.status_code)
print(response.json())const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "6962fd6f4cf4309309cac7b0",
parameters: {
"action": "create_document",
"title": "example_title"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));const axios = require('axios');
const url = "https://api.agentpmt.com/products/purchase";
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer ********"
};
const data = {
product_id: "6962fd6f4cf4309309cac7b0",
parameters: {
"action": "create_document",
"title": "example_title"
}
};
axios.post(url, data, { headers })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error("Error:", error.message);
});Login to view your API and budget keys. The example above uses placeholder values. Sign in to see personalized code with your bearer token.
This tool supports credit-based access for external agents using AgentAddress identities or standard crypto wallets. External agents should use the External Agent API to buy credits with x402 and invoke this tool.
1. Buy Credits
Purchase credits via x402 payment (500 credit minimum, 100 credits = $1).
# Request payment requirements (returns 402 + PAYMENT-REQUIRED header)
curl -i -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'
# Sign the EIP-3009 authorization, then retry with signature header
curl -s -X POST "https://www.agentpmt.com/api/external/credits/purchase" \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <base64-json>" \
-d '{ "wallet_address":"0xYOUR_WALLET", "credits": 500, "payment_method":"x402" }'2. Create a Session Nonce (nonce used in signed balance/invoke)
curl -s -X POST "https://www.agentpmt.com/api/external/auth/session" \
-H "Content-Type: application/json" \
-d '{ "wallet_address":"0xYOUR_WALLET" }'3. Invoke This Tool
Sign the message with your wallet (EIP-191 personal-sign), then POST to the invoke endpoint.
# Sign this message (wallet MUST be lowercased):
# agentpmt-external
# wallet:0xyourwallet...
# session:<session_nonce>
# request:<request_id>
# action:invoke
# product:6962fd6f4cf4309309cac7b0
# payload:<sha256(canonical_json(parameters))>
curl -s -X POST "https://www.agentpmt.com/api/external/tools/6962fd6f4cf4309309cac7b0/invoke" \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0xYOUR_WALLET",
"session_nonce": "<session_nonce>",
"request_id": "invoke-uuid",
"signature": "0x<signature>",
"parameters": {
"action": "your_action",
"your_param": "value"
}
}'Credentials
Manage credentials in your dashboard.
Actions(19)
create_document5cr2 params(1 required)Create a new Google Doc.
create_document5cr2 params(1 required)Create a new Google Doc.
titlerequiredstringDocument title.
textstringInitial body content for the document.
get_document5cr1 param(1 required)Retrieve a document's full content, text, word count, and structure.
get_document5cr1 param(1 required)Retrieve a document's full content, text, word count, and structure.
document_idrequiredstringGoogle Docs document ID (from the document URL).
search_documents5cr2 paramsSearch for Google Docs by name. Returns documents sorted by most recently modified. Omit query to list recent documents.
search_documents5cr2 paramsSearch for Google Docs by name. Returns documents sorted by most recently modified. Omit query to list recent documents.
querystringSearch term that matches document names (contains match).
max_resultsintegerMaximum results to return (1-100).
20batch_update5cr2 params(2 required)Execute raw Google Docs API batch update requests for advanced operations not covered by other actions.
batch_update5cr2 params(2 required)Execute raw Google Docs API batch update requests for advanced operations not covered by other actions.
document_idrequiredstringGoogle Docs document ID.
requestsrequiredarrayArray of raw Google Docs API request objects.
insert_text5cr3 params(2 required)Insert text at a specific character position in a document.
insert_text5cr3 params(2 required)Insert text at a specific character position in a document.
document_idrequiredstringGoogle Docs document ID.
textrequiredstringText content to insert.
locationinteger1-based character index for insertion. Defaults to 1 (beginning of document).
replace_text5cr4 params(3 required)Find and replace all occurrences of text in a document.
replace_text5cr4 params(3 required)Find and replace all occurrences of text in a document.
document_idrequiredstringGoogle Docs document ID.
search_textrequiredstringText to search for.
replace_withrequiredstringReplacement text.
match_casebooleanWhether to use case-sensitive search.
falseformat_text5cr5 params(4 required)Apply text and/or paragraph styling to a character range in a document.
format_text5cr5 params(4 required)Apply text and/or paragraph styling to a character range in a document.
document_idrequiredstringGoogle Docs document ID.
range_startrequiredintegerStart index of the range to format (1-based).
range_endrequiredintegerEnd index of the range to format (1-based).
text_stylerequiredobjectText styling options.
bold(boolean)- Apply bold formatting.italic(boolean)- Apply italic formatting.underline(boolean)- Apply underline formatting.strikethrough(boolean)- Apply strikethrough formatting.font_family(string)- Font family name (e.g., 'Arial', 'Times New Roman').font_size(object)- Font size with magnitude and unit.foreground_color(object)- Text color as RGB values (0-1).background_color(object)- Text highlight color as RGB values (0-1).link(string)- URL to create a hyperlink.paragraph_styleobjectParagraph styling options.
alignment(string)- Text alignment.line_spacing(number)- Line spacing (100=single, 150=1.5x, 200=double).indent_start(object)- Left indent with magnitude and unit.indent_end(object)- Right indent with magnitude and unit.indent_first_line(object)- First line indent with magnitude and unit.insert_image5cr5 params(2 required)Insert an inline image from a publicly accessible URL.
insert_image5cr5 params(2 required)Insert an inline image from a publicly accessible URL.
document_idrequiredstringGoogle Docs document ID.
image_urlrequiredstringPublicly accessible URL of the image to insert.
locationinteger1-based character index for insertion. Defaults to 1.
widthintegerImage width in pixels.
heightintegerImage height in pixels.
create_table5cr5 params(1 required)Insert a table into a document, optionally populated with data. If table_data is provided, dimensions are inferred from it.
create_table5cr5 params(1 required)Insert a table into a document, optionally populated with data. If table_data is provided, dimensions are inferred from it.
document_idrequiredstringGoogle Docs document ID.
rowsintegerNumber of table rows (1-100). Not needed if table_data is provided.
columnsintegerNumber of table columns (1-20). Not needed if table_data is provided.
table_dataarray2D array of strings representing table cell data.
locationinteger1-based character index for table insertion. Defaults to 1.
insert_page_break5cr2 params(1 required)Insert a page break at a specific position.
insert_page_break5cr2 params(1 required)Insert a page break at a specific position.
document_idrequiredstringGoogle Docs document ID.
locationinteger1-based character index for the page break. Defaults to 1.
insert_section_break5cr2 params(1 required)Insert a section break at a specific position.
insert_section_break5cr2 params(1 required)Insert a section break at a specific position.
document_idrequiredstringGoogle Docs document ID.
locationinteger1-based character index for the section break. Defaults to 1.
create_header5cr3 params(1 required)Add a header to the document.
create_header5cr3 params(1 required)Add a header to the document.
document_idrequiredstringGoogle Docs document ID.
header_typestringHeader type to create.
DEFAULTtextstringHeader text content.
create_footer5cr2 params(1 required)Add a footer to the document.
create_footer5cr2 params(1 required)Add a footer to the document.
document_idrequiredstringGoogle Docs document ID.
footer_typestringFooter type to create.
DEFAULTupdate_style5cr5 params(4 required)Alias for format_text. Apply text and/or paragraph styling to a character range.
update_style5cr5 params(4 required)Alias for format_text. Apply text and/or paragraph styling to a character range.
document_idrequiredstringGoogle Docs document ID.
range_startrequiredintegerStart index of the range to format (1-based).
range_endrequiredintegerEnd index of the range to format (1-based).
text_stylerequiredobjectText styling options (bold, italic, underline, strikethrough, font_family, font_size, foreground_color, background_color, link).
paragraph_styleobjectParagraph styling options (alignment, line_spacing, indents).
create_named_range5cr4 params(4 required)Create a named range (bookmark) spanning a character range in the document.
create_named_range5cr4 params(4 required)Create a named range (bookmark) spanning a character range in the document.
document_idrequiredstringGoogle Docs document ID.
range_namerequiredstringName for the named range/bookmark.
range_startrequiredintegerStart index of the range (1-based).
range_endrequiredintegerEnd index of the range (1-based).
export_document5cr2 params(2 required)Export a document to another format. Text formats (txt, html) return content directly; binary formats return base64-encoded content.
export_document5cr2 params(2 required)Export a document to another format. Text formats (txt, html) return content directly; binary formats return base64-encoded content.
document_idrequiredstringGoogle Docs document ID.
export_formatrequiredstringTarget export format.
share_document5cr4 params(2 required)Set sharing permissions on a document via Google Drive.
share_document5cr4 params(2 required)Set sharing permissions on a document via Google Drive.
document_idrequiredstringGoogle Docs document ID.
share_withrequiredarrayList of permission objects defining who to share with.
send_notificationbooleanSend email notification when sharing.
trueemail_messagestringCustom message for the sharing notification email.
get_permissions5cr1 param(1 required)List the current sharing permissions on a document.
get_permissions5cr1 param(1 required)List the current sharing permissions on a document.
document_idrequiredstringGoogle Docs document ID.
quick_create5cr2 params(1 required)Create a document from a natural language description. If the text contains 'titled "..."' or 'called "..."', the title is extracted automatically.
quick_create5cr2 params(1 required)Create a document from a natural language description. If the text contains 'titled "..."' or 'called "..."', the title is extracted automatically.
textrequiredstringNatural language description or content for the document.
titlestringDocument title. If omitted, may be extracted from the text description.
Usage Instructions
Usage guidance provided directly by the developer for this product.
Google Docs Connector
Create, edit, format, and share Google Docs programmatically. Search for documents, insert text and images, build tables, apply formatting, export to multiple formats, and manage sharing permissions.
Actions
create_document
Create a new Google Doc.
Required: title
Optional: text (initial body content)
{"action": "create_document", "title": "Meeting Notes", "text": "Agenda:\n1. Review\n2. Planning"}
get_document
Retrieve a document's full content, text, word count, and structure.
Required: document_id
{"action": "get_document", "document_id": "1a2b3c4d5e"}
search_documents
Search for Google Docs by name. Returns documents sorted by most recently modified. Omit query to list recent documents.
Optional: query (name contains match), max_results (1-100, default 20)
{"action": "search_documents", "query": "Q1 report", "max_results": 5}
insert_text
Insert text at a specific character position in a document.
Required: document_id, text
Optional: location (1-based character index; default: 1)
{"action": "insert_text", "document_id": "1a2b3c4d5e", "text": "New paragraph\n", "location": 1}
replace_text
Find and replace all occurrences of text in a document.
Required: document_id, search_text, replace_with
Optional: match_case (default: false)
{"action": "replace_text", "document_id": "1a2b3c4d5e", "search_text": "draft", "replace_with": "final", "match_case": true}
format_text
Apply text and/or paragraph styling to a character range.
Required: document_id, range_start, range_end, text_style
Optional: paragraph_style
text_style options: bold, italic, underline, strikethrough (booleans), font_family (string), font_size (object with magnitude and unit), foreground_color, background_color (RGB objects with values 0-1), link (URL string)
paragraph_style options: alignment (START, CENTER, END, JUSTIFIED), line_spacing (100=single, 150=1.5x, 200=double), indent_start, indent_end, indent_first_line (objects with magnitude and unit)
{"action": "format_text", "document_id": "1a2b3c4d5e", "range_start": 1, "range_end": 15, "text_style": {"bold": true, "font_size": {"magnitude": 18, "unit": "PT"}}, "paragraph_style": {"alignment": "CENTER"}}
update_style
Alias for format_text. Accepts the same parameters.
{"action": "update_style", "document_id": "1a2b3c4d5e", "range_start": 1, "range_end": 10, "text_style": {"italic": true}}
insert_image
Insert an inline image from a publicly accessible URL.
Required: document_id, image_url
Optional: location (1-based index; default: 1), width (pixels), height (pixels)
{"action": "insert_image", "document_id": "1a2b3c4d5e", "image_url": "https://example.com/logo.png", "width": 200, "height": 100, "location": 1}
create_table
Insert a table into a document. If table_data is provided, dimensions are inferred from it and cells are populated.
Required: document_id
Optional: rows (1-100), columns (1-20), table_data (2D array of strings), location (1-based index; default: 1)
{"action": "create_table", "document_id": "1a2b3c4d5e", "table_data": [["Name", "Role"], ["Alice", "Engineer"], ["Bob", "Designer"]]}
{"action": "create_table", "document_id": "1a2b3c4d5e", "rows": 3, "columns": 4, "location": 1}
insert_page_break
Insert a page break at a specific position.
Required: document_id
Optional: location (1-based index; default: 1)
{"action": "insert_page_break", "document_id": "1a2b3c4d5e", "location": 50}
insert_section_break
Insert a section break at a specific position.
Required: document_id
Optional: location (1-based index; default: 1)
{"action": "insert_section_break", "document_id": "1a2b3c4d5e", "location": 100}
create_header
Add a header to the document.
Required: document_id
Optional: header_type (DEFAULT, FIRST_PAGE, EVEN_PAGE, ODD_PAGE; default: DEFAULT), text (header content)
{"action": "create_header", "document_id": "1a2b3c4d5e", "header_type": "DEFAULT", "text": "Company Report"}
create_footer
Add a footer to the document.
Required: document_id
Optional: footer_type (DEFAULT, FIRST_PAGE, EVEN_PAGE, ODD_PAGE; default: DEFAULT)
{"action": "create_footer", "document_id": "1a2b3c4d5e", "footer_type": "DEFAULT"}
create_named_range
Create a named range (bookmark) spanning a character range in the document.
Required: document_id, range_name, range_start, range_end
{"action": "create_named_range", "document_id": "1a2b3c4d5e", "range_name": "introduction", "range_start": 1, "range_end": 50}
export_document
Export a document to another format. Text formats (txt, html) return content directly; binary formats (pdf, docx, etc.) return base64-encoded content.
Required: document_id, export_format
Supported formats: pdf, docx, odt, rtf, txt, html, epub, zip
{"action": "export_document", "document_id": "1a2b3c4d5e", "export_format": "pdf"}
share_document
Set sharing permissions on a document.
Required: document_id, share_with (array of permission objects)
Each permission object: email (for user/group), role (reader, writer, commenter), type (user, group, domain, anyone), domain (for domain-wide sharing)
Optional: send_notification (default: true), email_message (custom notification text)
{"action": "share_document", "document_id": "1a2b3c4d5e", "share_with": [{"email": "colleague@example.com", "role": "writer", "type": "user"}], "send_notification": true, "email_message": "Please review this document."}
get_permissions
List the current sharing permissions on a document.
Required: document_id
{"action": "get_permissions", "document_id": "1a2b3c4d5e"}
batch_update
Execute raw Google Docs API batch update requests for advanced operations not covered by other actions.
Required: document_id, requests (array of Google Docs API request objects)
{"action": "batch_update", "document_id": "1a2b3c4d5e", "requests": [{"insertText": {"location": {"index": 1}, "text": "Hello World\n"}}]}
quick_create
Create a document from a natural language description. If the description contains a phrase like titled "..." or called "...", the title is extracted automatically.
Required: text (description or content)
Optional: title
{"action": "quick_create", "text": "Create a project plan titled \"Q2 Launch Plan\" with sections for goals, timeline, and team assignments."}
Common Workflows
Create and populate a document:
create_documentwith title and initial textinsert_textto add more content at specific positionsformat_textto style headings, bold key terms, etc.share_documentto distribute
Build a report with a table:
create_documentwith the report titleinsert_textfor the report bodycreate_tablewithtable_datafor structured dataexport_documentas PDF for distribution
Find and update a document:
search_documentsto locate the document by nameget_documentto read current contentreplace_textorinsert_textto make changesformat_textto adjust styling
Important Notes
- The
document_idis the alphanumeric string found in the Google Docs URL between/d/and/edit. - Character indices are 1-based. Use
get_documentto inspect the document structure and find the correct indices for insertions and formatting. - When using
format_text, you must provide at leasttext_style. Theparagraph_styleis optional and applied to the same range. - The
update_styleaction is identical toformat_text. - For
create_tablewithtable_data, the number of rows and columns is inferred from the data array. You do not need to specifyrowsorcolumnsseparately. - Export formats
txtandhtmlreturn plain text content. All other formats return base64-encoded binary data. - Sharing uses Google Drive permissions. The
anyonetype makes the document publicly accessible with the specified role.
About The Developer

Apoth3osis
Joined Agent Payment: August 14, 2025
We build tools that enable AI agents to excel in the mathematical realm.
Our small team develops experimental and unique solutions in the AI arena, with a strong focus on modular computing for agentic applications and custom model deployment. We have handled projects for a variety of applications across many sectors, from algorithmic trading and financial analysis, to molecular simulations and predictions, to habitat and biodiversity monitoring and wildlife conservation.







