matimo-twilio 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,63 @@
1
+ # Dependencies
2
+ **/node_modules/
3
+ package-lock.json
4
+ yarn.lock
5
+
6
+ # Build output
7
+ **/dist/
8
+ *.tsbuildinfo
9
+
10
+ # Python compiled / build
11
+ **/__pycache__/
12
+ *.py[cod]
13
+ *$py.class
14
+ *.egg-info/
15
+ *.egg
16
+ **/build/
17
+ **/.eggs/
18
+ **/.venv/
19
+ **/.mypy_cache/
20
+ **/.ruff_cache/
21
+ **/.pytest_cache/
22
+
23
+ # Test coverage
24
+ **/coverage/
25
+ **/.nyc_output/
26
+
27
+ # IDE
28
+ .vscode/
29
+ .idea/
30
+ *.swp
31
+ *.swo
32
+ *~
33
+ .DS_Store
34
+
35
+ # Environment
36
+ .env
37
+ .env.local
38
+ .env.*.local
39
+
40
+ # Logs
41
+ *.log
42
+ npm-debug.log*
43
+ yarn-debug.log*
44
+ yarn-error.log*
45
+
46
+ # OS
47
+ .DS_Store
48
+ Thumbs.db
49
+
50
+ # Temporary files
51
+ tmp/
52
+ temp/
53
+ *.tmp
54
+ typescript/examples/mcp/matimo-tools/.matimo-approvals.json
55
+ typescript/examples/mcp/matimo-tools/fetch-weather/definition.yaml
56
+ typescript/examples/mcp/matimo-tools/npm_downloads/definition.yaml
57
+ typescript/examples/mcp/matimo-tools/skills/ecosystem-health/SKILL.md
58
+ typescript/examples/mcp/matimo-tools/skills/matimo-health-check/SKILL.md
59
+ typescript/examples/mcp/matimo-tools/skills/moltbook-identity/SKILL.md
60
+ typescript/packages/cli/.matimo/certs/server.crt
61
+ typescript/packages/cli/.matimo/certs/server.key
62
+ typescript/examples/mcp/.matimo/certs/server.crt
63
+ typescript/examples/mcp/.matimo/certs/server.key
@@ -0,0 +1,96 @@
1
+ Metadata-Version: 2.4
2
+ Name: matimo-twilio
3
+ Version: 0.1.0
4
+ Summary: Matimo provider — Twilio tools (SMS, MMS, message history)
5
+ License: MIT
6
+ Keywords: agents,ai,matimo,tools,twilio
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Requires-Python: >=3.11
12
+ Requires-Dist: matimo-core<0.2.0,>=0.1.0
13
+ Requires-Dist: twilio>=8.0
14
+ Description-Content-Type: text/markdown
15
+
16
+ # matimo-twilio
17
+
18
+ > Twilio tools for [Matimo](https://matimo.dev) — send SMS, send MMS, and retrieve message history.
19
+
20
+ [![PyPI](https://img.shields.io/pypi/v/matimo-twilio)](https://pypi.org/project/matimo-twilio/)
21
+ [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://matimo.dev/docs)
22
+
23
+ ---
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ pip install matimo matimo-twilio
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Available Tools (4 Total)
34
+
35
+ | Tool | Description |
36
+ |------|-------------|
37
+ | `twilio-send-sms` | Send an SMS message to a phone number |
38
+ | `twilio-send-mms` | Send an MMS message with media |
39
+ | `twilio-list-messages` | List sent/received messages with filters |
40
+ | `twilio-get-message` | Get details of a specific message by SID |
41
+
42
+ ---
43
+
44
+ ## Quick Start
45
+
46
+ ```python
47
+ import asyncio
48
+ import os
49
+ from matimo import Matimo
50
+ from matimo_twilio import get_tools_path
51
+
52
+ async def main():
53
+ matimo = await Matimo.init(get_tools_path())
54
+
55
+ # Send an SMS
56
+ await matimo.execute('twilio-send-sms', {
57
+ 'to': '+15551234567',
58
+ 'from': '+15559876543',
59
+ 'body': 'Hello from Matimo!',
60
+ })
61
+
62
+ # List recent messages
63
+ result = await matimo.execute('twilio-list-messages', {
64
+ 'limit': 10,
65
+ })
66
+ print(result)
67
+
68
+ asyncio.run(main())
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Authentication
74
+
75
+ ```bash
76
+ export TWILIO_ACCOUNT_SID="ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
77
+ export TWILIO_AUTH_TOKEN="your-auth-token"
78
+ ```
79
+
80
+ Find these in your [Twilio Console](https://console.twilio.com/).
81
+
82
+ ---
83
+
84
+ ## Documentation
85
+
86
+ - [Twilio Messaging API](https://www.twilio.com/docs/messaging)
87
+ - [Python Examples](https://github.com/tallclub/matimo/tree/main/python/examples/native/twilio)
88
+
89
+ ---
90
+
91
+ ## Links
92
+
93
+ - **PyPI:** https://pypi.org/project/matimo-twilio/
94
+ - **GitHub:** https://github.com/tallclub/matimo
95
+ - **Twilio Docs:** https://www.twilio.com/docs
96
+
@@ -0,0 +1,81 @@
1
+ # matimo-twilio
2
+
3
+ > Twilio tools for [Matimo](https://matimo.dev) — send SMS, send MMS, and retrieve message history.
4
+
5
+ [![PyPI](https://img.shields.io/pypi/v/matimo-twilio)](https://pypi.org/project/matimo-twilio/)
6
+ [![Docs](https://img.shields.io/badge/docs-matimo.dev-blue)](https://matimo.dev/docs)
7
+
8
+ ---
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pip install matimo matimo-twilio
14
+ ```
15
+
16
+ ---
17
+
18
+ ## Available Tools (4 Total)
19
+
20
+ | Tool | Description |
21
+ |------|-------------|
22
+ | `twilio-send-sms` | Send an SMS message to a phone number |
23
+ | `twilio-send-mms` | Send an MMS message with media |
24
+ | `twilio-list-messages` | List sent/received messages with filters |
25
+ | `twilio-get-message` | Get details of a specific message by SID |
26
+
27
+ ---
28
+
29
+ ## Quick Start
30
+
31
+ ```python
32
+ import asyncio
33
+ import os
34
+ from matimo import Matimo
35
+ from matimo_twilio import get_tools_path
36
+
37
+ async def main():
38
+ matimo = await Matimo.init(get_tools_path())
39
+
40
+ # Send an SMS
41
+ await matimo.execute('twilio-send-sms', {
42
+ 'to': '+15551234567',
43
+ 'from': '+15559876543',
44
+ 'body': 'Hello from Matimo!',
45
+ })
46
+
47
+ # List recent messages
48
+ result = await matimo.execute('twilio-list-messages', {
49
+ 'limit': 10,
50
+ })
51
+ print(result)
52
+
53
+ asyncio.run(main())
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Authentication
59
+
60
+ ```bash
61
+ export TWILIO_ACCOUNT_SID="ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
62
+ export TWILIO_AUTH_TOKEN="your-auth-token"
63
+ ```
64
+
65
+ Find these in your [Twilio Console](https://console.twilio.com/).
66
+
67
+ ---
68
+
69
+ ## Documentation
70
+
71
+ - [Twilio Messaging API](https://www.twilio.com/docs/messaging)
72
+ - [Python Examples](https://github.com/tallclub/matimo/tree/main/python/examples/native/twilio)
73
+
74
+ ---
75
+
76
+ ## Links
77
+
78
+ - **PyPI:** https://pypi.org/project/matimo-twilio/
79
+ - **GitHub:** https://github.com/tallclub/matimo
80
+ - **Twilio Docs:** https://www.twilio.com/docs
81
+
@@ -0,0 +1,28 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "matimo-twilio"
7
+ version = "0.1.0"
8
+ description = "Matimo provider — Twilio tools (SMS, MMS, message history)"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.11"
12
+ keywords = ["ai", "tools", "agents", "matimo", "twilio"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3.11",
18
+ ]
19
+ dependencies = [
20
+ "matimo-core>=0.1.0,<0.2.0",
21
+ "twilio>=8.0",
22
+ ]
23
+
24
+ [project.entry-points."matimo.providers"]
25
+ twilio = "matimo_twilio:get_tools_path"
26
+
27
+ [tool.hatch.build.targets.wheel]
28
+ packages = ["src/matimo_twilio"]
@@ -0,0 +1,17 @@
1
+ """Matimo twilio provider — exposes the path to YAML tool definitions."""
2
+ from __future__ import annotations
3
+
4
+ import importlib.resources
5
+ from pathlib import Path
6
+
7
+
8
+ def get_tools_path() -> str:
9
+ """Return the absolute path to the bundled twilio tool definitions."""
10
+ try:
11
+ ref = importlib.resources.files("matimo_twilio") / "tools"
12
+ return str(ref)
13
+ except Exception:
14
+ return str(Path(__file__).parent / "tools")
15
+
16
+
17
+ __all__ = ["get_tools_path"]
@@ -0,0 +1,133 @@
1
+ name: twilio-get-message
2
+ version: '1.0.0'
3
+ description: >
4
+ Fetch a single Message resource from the Twilio Programmable Messaging API.
5
+ Returns the full details of a message identified by its Message SID,
6
+ including its current status, body, sender, recipient, and timestamps.
7
+
8
+ parameters:
9
+ account_sid:
10
+ type: string
11
+ required: true
12
+ description: >
13
+ The SID of the Account associated with the Message resource.
14
+ Found on the Twilio Console dashboard: https://console.twilio.com
15
+ Pattern: ^AC[0-9a-fA-F]{32}$
16
+ message_sid:
17
+ type: string
18
+ required: true
19
+ description: >
20
+ The SID of the Message resource to fetch.
21
+ Pattern: ^(SM|MM)[0-9a-fA-F]{32}$
22
+ SMS messages start with "SM", MMS messages start with "MM".
23
+
24
+ execution:
25
+ type: http
26
+ method: GET
27
+ url: 'https://api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages/{message_sid}.json'
28
+ timeout: 30000
29
+
30
+ authentication:
31
+ type: basic
32
+ username_env: TWILIO_ACCOUNT_SID
33
+ password_env: TWILIO_AUTH_TOKEN
34
+
35
+ output_schema:
36
+ type: object
37
+ properties:
38
+ success:
39
+ type: boolean
40
+ description: Whether the HTTP request was successful (2xx status)
41
+ data:
42
+ type: object
43
+ description: The Twilio Message resource
44
+ properties:
45
+ sid:
46
+ type: string
47
+ description: The unique SID identifying this Message resource
48
+ account_sid:
49
+ type: string
50
+ description: The SID of the Account associated with this Message
51
+ to:
52
+ type: string
53
+ description: The recipient's phone number in E.164 format
54
+ from:
55
+ type: string
56
+ description: The sender's phone number in E.164 format
57
+ body:
58
+ type: string
59
+ description: The text content of the message (empty string if redacted)
60
+ status:
61
+ type: string
62
+ description: >
63
+ The current status of the Message.
64
+ Possible values: queued, sending, sent, failed, delivered, undelivered,
65
+ receiving, received, accepted, scheduled, canceled, read
66
+ direction:
67
+ type: string
68
+ description: >
69
+ The direction of the message.
70
+ Possible values: inbound, outbound-api, outbound-call, outbound-reply
71
+ date_created:
72
+ type: string
73
+ description: The RFC 2822 timestamp (GMT) when the Message resource was created
74
+ date_sent:
75
+ type: string
76
+ description: The RFC 2822 timestamp (GMT) when the message was sent
77
+ date_updated:
78
+ type: string
79
+ description: The RFC 2822 timestamp (GMT) when the Message resource was last updated
80
+ error_code:
81
+ type: string
82
+ description: The error code if status is failed or undelivered, otherwise null
83
+ error_message:
84
+ type: string
85
+ description: The description of the error_code, otherwise null
86
+ price:
87
+ type: string
88
+ description: The amount billed for the message in the currency of price_unit
89
+ price_unit:
90
+ type: string
91
+ description: The currency in which price is measured (ISO 4127 format, e.g. usd)
92
+ num_segments:
93
+ type: string
94
+ description: Number of SMS segments that make up the complete message
95
+ num_media:
96
+ type: string
97
+ description: Number of media files associated with the Message resource
98
+ messaging_service_sid:
99
+ type: string
100
+ description: The SID of the Messaging Service associated with this Message
101
+ api_version:
102
+ type: string
103
+ description: The API version used to process the Message
104
+ uri:
105
+ type: string
106
+ description: The URI of this Message resource, relative to https://api.twilio.com
107
+ subresource_uris:
108
+ type: object
109
+ description: URIs of sub-resources (media, feedback) relative to the API root
110
+ statusCode:
111
+ type: number
112
+ description: HTTP status code of the response
113
+
114
+ error_handling:
115
+ retry: 2
116
+ backoff_type: exponential
117
+ initial_delay_ms: 500
118
+ retry_on_status:
119
+ - 429
120
+ - 500
121
+ - 503
122
+
123
+ examples:
124
+ - name: 'Fetch an SMS message by SID'
125
+ params:
126
+ account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
127
+ message_sid: SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
128
+ expected_result: 'Returns full Message resource including current status, body, and timestamps'
129
+ - name: 'Fetch an MMS message by SID'
130
+ params:
131
+ account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
132
+ message_sid: MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
133
+ expected_result: 'Returns Message resource with num_media > 0 and subresource_uris.media'
@@ -0,0 +1,133 @@
1
+ name: twilio-list-messages
2
+ version: '1.0.0'
3
+ description: >
4
+ Read multiple Message resources from the Twilio Programmable Messaging API.
5
+ Returns a paginated list of messages in your account, sorted by DateSent
6
+ with the most recent messages appearing first. Supports filtering by
7
+ recipient (To), sender (From), and sent date.
8
+ See: https://www.twilio.com/docs/messaging/api/message-resource#read-multiple-message-resources
9
+
10
+ parameters:
11
+ account_sid:
12
+ type: string
13
+ required: true
14
+ description: >
15
+ The SID of the Account associated with the Message resources.
16
+ Found on the Twilio Console dashboard: https://console.twilio.com
17
+ Pattern: ^AC[0-9a-fA-F]{32}$
18
+ to:
19
+ type: string
20
+ required: false
21
+ description: >
22
+ Filter by recipient phone number.
23
+ E.g. "+15558881111" to retrieve messages sent to that number.
24
+ Must be in E.164 format.
25
+ from:
26
+ type: string
27
+ required: false
28
+ description: >
29
+ Filter by sender phone number.
30
+ E.g. "+15552229999" to retrieve messages sent from that number.
31
+ Must be in E.164 format.
32
+ date_sent:
33
+ type: string
34
+ required: false
35
+ description: >
36
+ Filter by the sent date (GMT). Accepts dates in formats:
37
+ YYYY-MM-DD — messages with this specific sent date
38
+ <=YYYY-MM-DD — messages with sent_date on or before this date
39
+ >=YYYY-MM-DD — messages with sent_date on or after this date
40
+ page_size:
41
+ type: number
42
+ required: false
43
+ description: >
44
+ How many Message resources to return per page.
45
+ Default is 50. Maximum is 1000. Minimum is 1.
46
+ default: 50
47
+ min: 1
48
+ max: 1000
49
+
50
+ execution:
51
+ type: http
52
+ method: GET
53
+ url: 'https://api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages.json'
54
+ query_params:
55
+ To: '{to}'
56
+ From: '{from}'
57
+ DateSent: '{date_sent}'
58
+ PageSize: '{page_size}'
59
+ timeout: 30000
60
+
61
+ authentication:
62
+ type: basic
63
+ username_env: TWILIO_ACCOUNT_SID
64
+ password_env: TWILIO_AUTH_TOKEN
65
+
66
+ output_schema:
67
+ type: object
68
+ properties:
69
+ success:
70
+ type: boolean
71
+ description: Whether the HTTP request was successful (2xx status)
72
+ data:
73
+ type: object
74
+ description: The paginated list of Message resources
75
+ properties:
76
+ messages:
77
+ type: array
78
+ description: Array of Message resource objects
79
+ end:
80
+ type: number
81
+ description: Index of the last record in the current page (0-based)
82
+ first_page_uri:
83
+ type: string
84
+ description: URI of the first page of results
85
+ next_page_uri:
86
+ type: string
87
+ description: URI of the next page of results (null if no more pages)
88
+ previous_page_uri:
89
+ type: string
90
+ description: URI of the previous page of results (null on first page)
91
+ page:
92
+ type: number
93
+ description: The current page index (0-based)
94
+ page_size:
95
+ type: number
96
+ description: The number of records per page
97
+ start:
98
+ type: number
99
+ description: Index of the first record in the current page (0-based)
100
+ uri:
101
+ type: string
102
+ description: URI of the current page of results
103
+ statusCode:
104
+ type: number
105
+ description: HTTP status code of the response
106
+
107
+ error_handling:
108
+ retry: 2
109
+ backoff_type: exponential
110
+ initial_delay_ms: 500
111
+ retry_on_status:
112
+ - 429
113
+ - 500
114
+ - 503
115
+
116
+ examples:
117
+ - name: 'List recent messages (default page size 50)'
118
+ params:
119
+ account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
120
+ expected_result: 'Returns up to 50 most recent messages with pagination metadata'
121
+ - name: 'List messages sent to a specific number'
122
+ params:
123
+ account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
124
+ to: '+15558675310'
125
+ page_size: 20
126
+ expected_result: 'Returns messages filtered by recipient with pagination'
127
+ - name: 'List messages from a specific sender on a date'
128
+ params:
129
+ account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
130
+ from: '+15557122661'
131
+ date_sent: '2024-01-15'
132
+ page_size: 10
133
+ expected_result: 'Returns messages sent from that number on the specified date'
@@ -0,0 +1,162 @@
1
+ name: twilio-send-mms
2
+ version: '1.0.0'
3
+ description: >
4
+ Send an outbound MMS message with one or more media files via the Twilio
5
+ Programmable Messaging API. Supported media types include jpeg, jpg, gif,
6
+ and png (up to 5 MB each), and other accepted media types up to 500 KB.
7
+ Up to 10 media URLs can be included per message.
8
+
9
+ parameters:
10
+ account_sid:
11
+ type: string
12
+ required: true
13
+ description: >
14
+ Your Twilio Account SID (e.g. "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx").
15
+ Found on the Twilio Console dashboard: https://console.twilio.com
16
+ to:
17
+ type: string
18
+ required: true
19
+ description: >
20
+ The recipient's phone number in E.164 format (e.g. "+15558675310").
21
+ Must be a valid phone number capable of receiving MMS.
22
+ from:
23
+ type: string
24
+ required: true
25
+ description: >
26
+ The sender's Twilio phone number in E.164 format (e.g. "+15557122661").
27
+ Must be a Twilio MMS-capable number that belongs to your account.
28
+ media_url:
29
+ type: string
30
+ required: true
31
+ description: >
32
+ The URL of a media file to include in the MMS message.
33
+ Fully supported types: jpeg, jpg, gif, png (up to 5 MB).
34
+ Other accepted types: up to 500 KB.
35
+ Must be a publicly accessible URL.
36
+ body:
37
+ type: string
38
+ required: false
39
+ description: >
40
+ Optional text content to accompany the media.
41
+ Can be up to 1,600 characters. Note: WhatsApp does not support
42
+ including a text body in the same message as video, audio, document,
43
+ contact, or location media types.
44
+ status_callback:
45
+ type: string
46
+ required: false
47
+ description: >
48
+ The URL of the endpoint to which Twilio sends Message status callback
49
+ requests when the Message status changes. URL must contain a valid
50
+ hostname and underscores are not allowed.
51
+
52
+ execution:
53
+ type: http
54
+ method: POST
55
+ url: 'https://api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages.json'
56
+ headers:
57
+ Content-Type: application/x-www-form-urlencoded
58
+ body:
59
+ To: '{to}'
60
+ From: '{from}'
61
+ MediaUrl: '{media_url}'
62
+ Body: '{body}'
63
+ StatusCallback: '{status_callback}'
64
+ timeout: 30000
65
+
66
+ authentication:
67
+ type: basic
68
+ username_env: TWILIO_ACCOUNT_SID
69
+ password_env: TWILIO_AUTH_TOKEN
70
+
71
+ output_schema:
72
+ type: object
73
+ properties:
74
+ success:
75
+ type: boolean
76
+ description: Whether the HTTP request was successful (2xx status)
77
+ data:
78
+ type: object
79
+ description: The Twilio Message resource returned by the API
80
+ properties:
81
+ sid:
82
+ type: string
83
+ description: The unique SID identifying this Message resource (e.g. MMxxx for MMS)
84
+ account_sid:
85
+ type: string
86
+ description: The SID of the Account that created this Message resource
87
+ to:
88
+ type: string
89
+ description: The recipient's phone number in E.164 format
90
+ from:
91
+ type: string
92
+ description: The sender's phone number in E.164 format
93
+ body:
94
+ type: string
95
+ description: The text content of the message (if provided)
96
+ status:
97
+ type: string
98
+ description: >
99
+ The status of the Message. For new outbound MMS this is 'queued'.
100
+ Possible values: queued, sending, sent, failed, delivered, undelivered
101
+ direction:
102
+ type: string
103
+ description: The direction of the message (outbound-api for REST API messages)
104
+ date_created:
105
+ type: string
106
+ description: The RFC 2822 timestamp (GMT) when the Message resource was created
107
+ date_sent:
108
+ type: string
109
+ description: The RFC 2822 timestamp (GMT) when the message was sent
110
+ date_updated:
111
+ type: string
112
+ description: The RFC 2822 timestamp (GMT) when the Message resource was last updated
113
+ error_code:
114
+ type: string
115
+ description: The error code if status is failed or undelivered, otherwise null
116
+ error_message:
117
+ type: string
118
+ description: The description of the error_code, otherwise null
119
+ num_media:
120
+ type: string
121
+ description: Number of media files associated with the Message resource
122
+ num_segments:
123
+ type: string
124
+ description: Number of SMS segments (typically '1' for MMS)
125
+ messaging_service_sid:
126
+ type: string
127
+ description: The SID of the Messaging Service associated with this Message
128
+ uri:
129
+ type: string
130
+ description: The URI of this Message resource, relative to https://api.twilio.com
131
+ subresource_uris:
132
+ type: object
133
+ description: URIs of sub-resources (media, feedback) relative to the API root
134
+ statusCode:
135
+ type: number
136
+ description: HTTP status code of the response
137
+
138
+ error_handling:
139
+ retry: 2
140
+ backoff_type: exponential
141
+ initial_delay_ms: 500
142
+ retry_on_status:
143
+ - 429
144
+ - 500
145
+ - 503
146
+
147
+ examples:
148
+ - name: 'Send MMS with image'
149
+ params:
150
+ account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
151
+ to: '+15558675310'
152
+ from: '+15557122661'
153
+ media_url: 'https://example.com/images/photo.jpg'
154
+ body: 'Check out this photo!'
155
+ expected_result: 'Returns Message resource with sid (MM...) and num_media: "1"'
156
+ - name: 'Send MMS with image only (no text body)'
157
+ params:
158
+ account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
159
+ to: '+15558675310'
160
+ from: '+15557122661'
161
+ media_url: 'https://example.com/logo.png'
162
+ expected_result: 'Returns Message resource with sid and status: queued'
@@ -0,0 +1,155 @@
1
+ name: twilio-send-sms
2
+ version: '1.0.0'
3
+ description: >
4
+ Send an outbound SMS message via the Twilio Programmable Messaging API.
5
+ Sends a text message from a Twilio phone number to any E.164 phone number.
6
+ Returns a Message resource with its SID and initial status of 'queued'.
7
+
8
+ parameters:
9
+ account_sid:
10
+ type: string
11
+ required: true
12
+ description: >
13
+ Your Twilio Account SID (e.g. "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx").
14
+ Found on the Twilio Console dashboard: https://console.twilio.com
15
+ to:
16
+ type: string
17
+ required: true
18
+ description: >
19
+ The recipient's phone number in E.164 format (e.g. "+15558675310").
20
+ Must be a valid phone number reachable via SMS.
21
+ from:
22
+ type: string
23
+ required: true
24
+ description: >
25
+ The sender's Twilio phone number in E.164 format (e.g. "+15557122661").
26
+ Must be a Twilio number or short code that belongs to your account.
27
+ body:
28
+ type: string
29
+ required: true
30
+ description: >
31
+ The text content of the outgoing SMS message.
32
+ Can be up to 1,600 characters. Bodies exceeding 160 GSM-7 characters
33
+ are segmented and each segment is charged separately.
34
+ status_callback:
35
+ type: string
36
+ required: false
37
+ description: >
38
+ The URL of the endpoint to which Twilio sends Message status callback
39
+ requests when the Message status changes. URL must contain a valid
40
+ hostname and underscores are not allowed.
41
+
42
+ execution:
43
+ type: http
44
+ method: POST
45
+ url: 'https://api.twilio.com/2010-04-01/Accounts/{account_sid}/Messages.json'
46
+ headers:
47
+ Content-Type: application/x-www-form-urlencoded
48
+ body:
49
+ To: '{to}'
50
+ From: '{from}'
51
+ Body: '{body}'
52
+ StatusCallback: '{status_callback}'
53
+ timeout: 30000
54
+
55
+ authentication:
56
+ type: basic
57
+ username_env: TWILIO_ACCOUNT_SID
58
+ password_env: TWILIO_AUTH_TOKEN
59
+
60
+ output_schema:
61
+ type: object
62
+ properties:
63
+ success:
64
+ type: boolean
65
+ description: Whether the HTTP request was successful (2xx status)
66
+ data:
67
+ type: object
68
+ description: The Twilio Message resource returned by the API
69
+ properties:
70
+ sid:
71
+ type: string
72
+ description: The unique SID identifying this Message resource (e.g. SMxxx)
73
+ account_sid:
74
+ type: string
75
+ description: The SID of the Account that created this Message resource
76
+ to:
77
+ type: string
78
+ description: The recipient's phone number in E.164 format
79
+ from:
80
+ type: string
81
+ description: The sender's phone number in E.164 format
82
+ body:
83
+ type: string
84
+ description: The text content of the message
85
+ status:
86
+ type: string
87
+ description: >
88
+ The status of the Message. For new outbound messages this is 'queued'.
89
+ Possible values: queued, sending, sent, failed, delivered, undelivered
90
+ direction:
91
+ type: string
92
+ description: The direction of the message (outbound-api for REST API messages)
93
+ date_created:
94
+ type: string
95
+ description: The RFC 2822 timestamp (GMT) when the Message resource was created
96
+ date_sent:
97
+ type: string
98
+ description: The RFC 2822 timestamp (GMT) when the message was sent
99
+ date_updated:
100
+ type: string
101
+ description: The RFC 2822 timestamp (GMT) when the Message resource was last updated
102
+ error_code:
103
+ type: string
104
+ description: The error code if status is failed or undelivered, otherwise null
105
+ error_message:
106
+ type: string
107
+ description: The description of the error_code, otherwise null
108
+ num_segments:
109
+ type: string
110
+ description: Number of SMS segments the message body comprises
111
+ num_media:
112
+ type: string
113
+ description: Number of media files associated with the Message resource
114
+ messaging_service_sid:
115
+ type: string
116
+ description: The SID of the Messaging Service associated with this Message
117
+ uri:
118
+ type: string
119
+ description: The URI of this Message resource, relative to https://api.twilio.com
120
+ statusCode:
121
+ type: number
122
+ description: HTTP status code of the response
123
+
124
+ error_handling:
125
+ retry: 2
126
+ backoff_type: exponential
127
+ initial_delay_ms: 500
128
+ retry_on_status:
129
+ - 429
130
+ - 500
131
+ - 503
132
+
133
+ examples:
134
+ - name: 'Send a simple SMS'
135
+ params:
136
+ account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
137
+ to: '+15558675310'
138
+ from: '+15557122661'
139
+ body: 'Hello from Matimo!'
140
+ expected_result: 'Returns Message resource with sid and status: queued'
141
+ - name: 'Send SMS with delivery callback'
142
+ params:
143
+ account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
144
+ to: '+15558675310'
145
+ from: '+15557122661'
146
+ body: 'Your order has shipped!'
147
+ status_callback: 'https://your-app.com/twilio/status'
148
+ expected_result: 'Returns Message resource; Twilio POSTs status updates to the callback URL'
149
+ - name: 'Send long SMS (multi-segment)'
150
+ params:
151
+ account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
152
+ to: '+15558675310'
153
+ from: '+15557122661'
154
+ body: 'This is a long message that exceeds 160 GSM-7 characters. It will be split into multiple segments and each segment will be charged accordingly. Make sure your Twilio account has sufficient balance.'
155
+ expected_result: 'Returns Message resource with num_segments > 1'