@superagnt/x-twitter-data 2.0.2
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.
- package/README.md +72 -0
- package/index.js +1774 -0
- package/openclaw.plugin.json +16 -0
- package/package.json +48 -0
package/index.js
ADDED
|
@@ -0,0 +1,1774 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* X (Twitter) Data — OpenClaw plugin
|
|
3
|
+
* Auto-generated by @superagnt/clawhub. Do not edit by hand.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { homedir as _homedir } from 'node:os'
|
|
7
|
+
import { join as _join } from 'node:path'
|
|
8
|
+
import { existsSync as _existsSync, readFileSync as _readFileSync } from 'node:fs'
|
|
9
|
+
|
|
10
|
+
const BASE_URL = 'https://api.superagnt.com/v1/data/x'
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
// ── Auth Module (inlined) ────────────────────────────────────────────────────
|
|
14
|
+
|
|
15
|
+
function getConfigPath() {
|
|
16
|
+
return _join(_homedir(), '.superagnt', 'config.json')
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function readAgntConfig() {
|
|
20
|
+
const configFile = getConfigPath()
|
|
21
|
+
if (!_existsSync(configFile)) return null
|
|
22
|
+
try {
|
|
23
|
+
return JSON.parse(_readFileSync(configFile, 'utf-8'))
|
|
24
|
+
} catch {
|
|
25
|
+
return null
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ── End Auth Module ──────────────────────────────────────────────────────────
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
// ── CLI Module (inlined) ─────────────────────────────────────────────────────
|
|
33
|
+
|
|
34
|
+
function maskApiKey(key) {
|
|
35
|
+
if (!key || typeof key !== 'string') return '(none)'
|
|
36
|
+
const k = key.trim()
|
|
37
|
+
if (k.length <= 8) return k.slice(0, 2) + '…'
|
|
38
|
+
return k.slice(0, 6) + '…' + k.slice(-4)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function registerAgntCli(api) {
|
|
42
|
+
api.registerCli(
|
|
43
|
+
({ program }) => {
|
|
44
|
+
const cmd = program
|
|
45
|
+
.command('superagnt')
|
|
46
|
+
.description('superagnt social data API (status, doctor)')
|
|
47
|
+
|
|
48
|
+
cmd
|
|
49
|
+
.command('status')
|
|
50
|
+
.description('Show whether an API key is configured (masked)')
|
|
51
|
+
.action(async () => {
|
|
52
|
+
const cfg = readAgntConfig()
|
|
53
|
+
const key = cfg?.apiKey
|
|
54
|
+
|
|
55
|
+
console.log('\nsuperagnt status\n')
|
|
56
|
+
if (!key) {
|
|
57
|
+
console.log(' API key: not configured')
|
|
58
|
+
console.log(' Workspace: —')
|
|
59
|
+
console.log('\n Get your API key at: https://app.superagnt.com/dashboard\n')
|
|
60
|
+
return
|
|
61
|
+
}
|
|
62
|
+
console.log(' API key: ' + maskApiKey(key) + ' (from ~/.superagnt/config.json)')
|
|
63
|
+
console.log(' Workspace: ' + (cfg?.workspaceId ?? '—'))
|
|
64
|
+
console.log('')
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
cmd
|
|
68
|
+
.command('doctor')
|
|
69
|
+
.description('Check connectivity and validate API key against api.superagnt.dev')
|
|
70
|
+
.action(async () => {
|
|
71
|
+
console.log('\nsuperagnt doctor\n')
|
|
72
|
+
|
|
73
|
+
try {
|
|
74
|
+
const publicRes = await fetch('https://api.superagnt.com/v1/platforms')
|
|
75
|
+
console.log(' Public API: ' + (publicRes.ok ? 'OK (' + publicRes.status + ')' : 'HTTP ' + publicRes.status))
|
|
76
|
+
} catch (err) {
|
|
77
|
+
const msg = err instanceof Error ? err.message : String(err)
|
|
78
|
+
console.log(' Public API: failed — ' + msg)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const cfg = readAgntConfig()
|
|
82
|
+
const key = cfg?.apiKey
|
|
83
|
+
|
|
84
|
+
if (!key) {
|
|
85
|
+
console.log('\n Authenticated: skipped (no API key)')
|
|
86
|
+
console.log(' Get your API key at: https://app.superagnt.com/dashboard\n')
|
|
87
|
+
return
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
const res = await fetch('https://api.superagnt.com/v1/platforms', {
|
|
92
|
+
headers: { Authorization: 'Bearer ' + key },
|
|
93
|
+
})
|
|
94
|
+
const text = await res.text()
|
|
95
|
+
let summary = 'HTTP ' + res.status
|
|
96
|
+
if (res.ok) {
|
|
97
|
+
try {
|
|
98
|
+
const json = JSON.parse(text)
|
|
99
|
+
const n = Array.isArray(json?.data) ? json.data.length : (json?.data ? Object.keys(json.data).length : 'ok')
|
|
100
|
+
summary = 'OK — platforms payload received (' + (typeof n === 'number' ? n + ' entries' : String(n)) + ')'
|
|
101
|
+
} catch {
|
|
102
|
+
summary = 'OK (' + res.status + ')'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
console.log(' Authenticated: ' + summary)
|
|
106
|
+
if (!res.ok) {
|
|
107
|
+
console.log(' If 401, get a new key at: https://app.superagnt.com/dashboard')
|
|
108
|
+
}
|
|
109
|
+
} catch (err) {
|
|
110
|
+
const msg = err instanceof Error ? err.message : String(err)
|
|
111
|
+
console.log(' Authenticated: failed — ' + msg)
|
|
112
|
+
}
|
|
113
|
+
console.log('')
|
|
114
|
+
})
|
|
115
|
+
},
|
|
116
|
+
{ commands: ['superagnt'] },
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// ── End CLI Module ───────────────────────────────────────────────────────────
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
// ── System prompt (inlined) ─────────────────────────────────────────────────
|
|
124
|
+
|
|
125
|
+
function getSystemPrompt(state) {
|
|
126
|
+
const scope = "Only the X (Twitter) API (x)."
|
|
127
|
+
if (state.ready && state.toolCount > 0) {
|
|
128
|
+
return (
|
|
129
|
+
'<superagnt>\n' +
|
|
130
|
+
'Ignore pretrained knowledge about superagnt tool names — use only tools that exist in this session.\n' +
|
|
131
|
+
'\n' +
|
|
132
|
+
'## What superagnt is\n' +
|
|
133
|
+
'superagnt exposes **structured social-data HTTP APIs** behind OpenClaw tools. Scope for this plugin: **' + scope + '**.\n' +
|
|
134
|
+
'\n' +
|
|
135
|
+
'## When to use superagnt tools\n' +
|
|
136
|
+
'- Use superagnt when the user needs **live social/network data** (profiles, posts, companies, comments, etc.) from supported platforms.\n' +
|
|
137
|
+
'- Prefer **discovery** when unsure which endpoint fits: call public discovery (GET /v1/platforms and GET /v1/platforms/{slug}) or read tool descriptions; do not invent endpoints or parameters.\n' +
|
|
138
|
+
'\n' +
|
|
139
|
+
'## Platform selection (high level)\n' +
|
|
140
|
+
'- **linkedin** — B2B enrichment, org/person research, hiring/sales workflows\n' +
|
|
141
|
+
'- **youtube** / **tiktok** — video/creator/channel metadata and content signals\n' +
|
|
142
|
+
'- **x** / **reddit** — short-form social and community threads\n' +
|
|
143
|
+
'- **instagram** — visual/creator discovery where Instagram is the source of truth\n' +
|
|
144
|
+
'- **facebook** — pages/groups/marketplace/adjacent Facebook surface areas exposed by the API\n' +
|
|
145
|
+
'\n' +
|
|
146
|
+
'## Rules\n' +
|
|
147
|
+
'- Do **not** fabricate tool names — pick from the registered superagnt_* tools only.\n' +
|
|
148
|
+
'- If authentication fails (401), tell the user to get a new key at https://app.superagnt.com/dashboard\n' +
|
|
149
|
+
'</superagnt>'
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (state.ready && state.toolCount === 0) {
|
|
154
|
+
return (
|
|
155
|
+
'<superagnt>\n' +
|
|
156
|
+
'The superagnt plugin loaded but registered **zero** API tools. Check your OpenClaw plugin packaging and regenerate the plugin from @superagnt/clawhub.\n' +
|
|
157
|
+
'</superagnt>'
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (state.error) {
|
|
162
|
+
return (
|
|
163
|
+
'<superagnt>\n' +
|
|
164
|
+
'superagnt plugin diagnostic: ' + state.error + '\n' +
|
|
165
|
+
'Do not pretend superagnt tools exist. Ask the user to fix configuration and restart the gateway.\n' +
|
|
166
|
+
'</superagnt>'
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return (
|
|
171
|
+
'<superagnt>\n' +
|
|
172
|
+
'superagnt tools are still loading. If the user asks for social data right now, ask them to wait a moment and retry.\n' +
|
|
173
|
+
'</superagnt>'
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// ── End System prompt ────────────────────────────────────────────────────────
|
|
178
|
+
|
|
179
|
+
const MCP_URL = 'https://mcp.superagnt.com/mcp/x'
|
|
180
|
+
|
|
181
|
+
async function mcpRpc(token, method, params) {
|
|
182
|
+
const res = await fetch(MCP_URL, {
|
|
183
|
+
method: 'POST',
|
|
184
|
+
headers: {
|
|
185
|
+
Authorization: `Bearer ${token}`,
|
|
186
|
+
'Content-Type': 'application/json',
|
|
187
|
+
Accept: 'application/json, text/event-stream',
|
|
188
|
+
},
|
|
189
|
+
body: JSON.stringify({ jsonrpc: '2.0', id: Date.now(), method, params }),
|
|
190
|
+
})
|
|
191
|
+
if (!res.ok) throw new Error(`MCP ${method} failed: HTTP ${res.status}`)
|
|
192
|
+
const data = await res.json()
|
|
193
|
+
if (data.error) throw new Error(`MCP ${method} error: ${data.error.message}`)
|
|
194
|
+
return data.result
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
async function registerLiveMcpTools(api, token) {
|
|
198
|
+
const result = await mcpRpc(token, 'tools/list', {})
|
|
199
|
+
const tools = Array.isArray(result?.tools) ? result.tools : []
|
|
200
|
+
if (tools.length === 0) throw new Error('MCP tools/list returned no tools')
|
|
201
|
+
for (const t of tools) {
|
|
202
|
+
api.registerTool({
|
|
203
|
+
name: t.name,
|
|
204
|
+
description: t.description,
|
|
205
|
+
inputSchema: t.inputSchema,
|
|
206
|
+
execute: async (input) => {
|
|
207
|
+
const args = parseToolInput(input)
|
|
208
|
+
const r = await mcpRpc(token, 'tools/call', { name: t.name, arguments: args })
|
|
209
|
+
if (r && r.structuredContent !== undefined) return r.structuredContent
|
|
210
|
+
const text = Array.isArray(r?.content) ? r.content.find((c) => c.type === 'text')?.text : undefined
|
|
211
|
+
if (text === undefined) return r
|
|
212
|
+
try { return JSON.parse(text) } catch { return text }
|
|
213
|
+
},
|
|
214
|
+
})
|
|
215
|
+
}
|
|
216
|
+
return tools.length
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function parseToolInput(input) {
|
|
220
|
+
if (input == null) return {}
|
|
221
|
+
if (typeof input === 'object' && !Array.isArray(input)) return input
|
|
222
|
+
if (typeof input === 'string') {
|
|
223
|
+
const trimmed = input.trim()
|
|
224
|
+
if (trimmed.startsWith('{')) {
|
|
225
|
+
try { const parsed = JSON.parse(trimmed); if (typeof parsed === 'object' && parsed && !Array.isArray(parsed)) return parsed } catch {}
|
|
226
|
+
}
|
|
227
|
+
throw new Error('Invalid tool input: expected a JSON object with named parameters, got string: ' + trimmed.slice(0, 80))
|
|
228
|
+
}
|
|
229
|
+
throw new Error('Invalid tool input: expected a JSON object, got ' + typeof input)
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function substitutePathParams(path, source) {
|
|
233
|
+
if (!source || typeof source !== 'object' || Array.isArray(source)) {
|
|
234
|
+
return { path, consumed: new Set() }
|
|
235
|
+
}
|
|
236
|
+
const consumed = new Set()
|
|
237
|
+
const next = path.replace(/\{([^/{}]+)\}/g, (_, name) => {
|
|
238
|
+
const v = source[name]
|
|
239
|
+
if (v === undefined || v === null || v === '') return `{${name}}`
|
|
240
|
+
consumed.add(name)
|
|
241
|
+
return encodeURIComponent(String(v))
|
|
242
|
+
})
|
|
243
|
+
return { path: next, consumed }
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
async function callSuperagnt(apiKey, method, path, query, body) {
|
|
247
|
+
const params = (query && typeof query === 'object' && !Array.isArray(query)) ? query : body
|
|
248
|
+
const { path: resolvedPath, consumed } = substitutePathParams(path, params)
|
|
249
|
+
const url = new URL(`${BASE_URL}${resolvedPath}`)
|
|
250
|
+
if (query && typeof query === 'object' && !Array.isArray(query)) {
|
|
251
|
+
for (const [k, v] of Object.entries(query)) {
|
|
252
|
+
if (consumed.has(k)) continue
|
|
253
|
+
if (v !== undefined && v !== '') url.searchParams.set(k, String(v))
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
const filteredBody = body && typeof body === 'object' && !Array.isArray(body)
|
|
257
|
+
? Object.fromEntries(Object.entries(body).filter(([k]) => !consumed.has(k)))
|
|
258
|
+
: body
|
|
259
|
+
const res = await fetch(url.toString(), {
|
|
260
|
+
method,
|
|
261
|
+
headers: { Authorization: `Bearer ${apiKey}`, 'Content-Type': 'application/json' },
|
|
262
|
+
body: filteredBody ? JSON.stringify(filteredBody) : undefined,
|
|
263
|
+
})
|
|
264
|
+
if (res.status === 401) {
|
|
265
|
+
return { error: 'Invalid or expired API key. Get a new key at https://app.superagnt.com/dashboard' }
|
|
266
|
+
}
|
|
267
|
+
return res.json()
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export default async function register(api) {
|
|
271
|
+
const apiKey = api.pluginConfig.apiKey || process.env.SUPERAGNT_API_KEY || readAgntConfig()?.apiKey
|
|
272
|
+
const mcpToken = api.pluginConfig.mcpToken || process.env.SUPERAGNT_MCP_TOKEN
|
|
273
|
+
|
|
274
|
+
function ensureApiKey() {
|
|
275
|
+
if (apiKey) return apiKey
|
|
276
|
+
throw new Error(
|
|
277
|
+
'[x-twitter-data] No API key configured. ' +
|
|
278
|
+
'Get your key at https://app.superagnt.com/dashboard and either:\n' +
|
|
279
|
+
' 1. Export it as SUPERAGNT_API_KEY, or\n' +
|
|
280
|
+
' 2. Add apiKey to your plugin config'
|
|
281
|
+
)
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
registerAgntCli(api)
|
|
285
|
+
|
|
286
|
+
const promptState = { toolCount: 0, error: '', ready: false }
|
|
287
|
+
api.on('before_prompt_build', () => ({
|
|
288
|
+
prependSystemContext: getSystemPrompt(promptState),
|
|
289
|
+
}))
|
|
290
|
+
|
|
291
|
+
// Live MCP mode: a workspace MCP token upgrades this plugin to the server's
|
|
292
|
+
// own tool surface, fetched fresh at load — it grows with agnt_tools_enable
|
|
293
|
+
// and never goes stale. Any failure falls back to the baked toolset below.
|
|
294
|
+
if (mcpToken) {
|
|
295
|
+
try {
|
|
296
|
+
promptState.toolCount = await registerLiveMcpTools(api, mcpToken)
|
|
297
|
+
promptState.ready = true
|
|
298
|
+
return
|
|
299
|
+
} catch (err) {
|
|
300
|
+
promptState.error = 'Live MCP connect failed (' + (err && err.message ? err.message : err) + '); using the built-in toolset.'
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
api.registerTool({
|
|
305
|
+
name: 'superagnt_x_user_medias_continuation_get',
|
|
306
|
+
description: "Continuation User's Media",
|
|
307
|
+
inputSchema: {
|
|
308
|
+
"type": "object",
|
|
309
|
+
"properties": {
|
|
310
|
+
"limit": {
|
|
311
|
+
"type": "number",
|
|
312
|
+
"description": "limit"
|
|
313
|
+
},
|
|
314
|
+
"continuation_token": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"description": "continuation_token"
|
|
317
|
+
},
|
|
318
|
+
"user_id": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"description": "user_id"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"required": [
|
|
324
|
+
"continuation_token",
|
|
325
|
+
"user_id"
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
execute: async (input) => {
|
|
329
|
+
const key = await ensureApiKey()
|
|
330
|
+
const params = parseToolInput(input)
|
|
331
|
+
return callSuperagnt(key, 'GET', '/user/medias/continuation', params)
|
|
332
|
+
},
|
|
333
|
+
})
|
|
334
|
+
|
|
335
|
+
api.registerTool({
|
|
336
|
+
name: 'superagnt_x_user_medias_continuation_post',
|
|
337
|
+
description: "Continuation User's Media",
|
|
338
|
+
inputSchema: {
|
|
339
|
+
"type": "object",
|
|
340
|
+
"properties": {
|
|
341
|
+
"user_id": {
|
|
342
|
+
"type": "integer",
|
|
343
|
+
"description": "user_id"
|
|
344
|
+
},
|
|
345
|
+
"continuation_token": {
|
|
346
|
+
"type": "string",
|
|
347
|
+
"description": "continuation_token"
|
|
348
|
+
},
|
|
349
|
+
"limit": {
|
|
350
|
+
"type": "integer",
|
|
351
|
+
"description": "limit"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
execute: async (input) => {
|
|
356
|
+
const key = await ensureApiKey()
|
|
357
|
+
const params = parseToolInput(input)
|
|
358
|
+
return callSuperagnt(key, 'POST', '/user/medias/continuation', undefined, params)
|
|
359
|
+
},
|
|
360
|
+
})
|
|
361
|
+
|
|
362
|
+
api.registerTool({
|
|
363
|
+
name: 'superagnt_x_User_s_Media_get__user_medias',
|
|
364
|
+
description: "User's Media",
|
|
365
|
+
inputSchema: {
|
|
366
|
+
"type": "object",
|
|
367
|
+
"properties": {
|
|
368
|
+
"limit": {
|
|
369
|
+
"type": "number",
|
|
370
|
+
"description": "limit"
|
|
371
|
+
},
|
|
372
|
+
"user_id": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"description": "user_id"
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"required": [
|
|
378
|
+
"user_id"
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
execute: async (input) => {
|
|
382
|
+
const key = await ensureApiKey()
|
|
383
|
+
const params = parseToolInput(input)
|
|
384
|
+
return callSuperagnt(key, 'GET', '/user/medias', params)
|
|
385
|
+
},
|
|
386
|
+
})
|
|
387
|
+
|
|
388
|
+
api.registerTool({
|
|
389
|
+
name: 'superagnt_x_User_s_Media_post__user_medias',
|
|
390
|
+
description: "User's Media",
|
|
391
|
+
inputSchema: {
|
|
392
|
+
"type": "object",
|
|
393
|
+
"properties": {
|
|
394
|
+
"user_id": {
|
|
395
|
+
"type": "integer",
|
|
396
|
+
"description": "user_id"
|
|
397
|
+
},
|
|
398
|
+
"limit": {
|
|
399
|
+
"type": "integer",
|
|
400
|
+
"description": "limit"
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
execute: async (input) => {
|
|
405
|
+
const key = await ensureApiKey()
|
|
406
|
+
const params = parseToolInput(input)
|
|
407
|
+
return callSuperagnt(key, 'POST', '/user/medias', undefined, params)
|
|
408
|
+
},
|
|
409
|
+
})
|
|
410
|
+
|
|
411
|
+
api.registerTool({
|
|
412
|
+
name: 'superagnt_x_user_likes_continuation_get',
|
|
413
|
+
description: "Continuation User's Likes",
|
|
414
|
+
inputSchema: {
|
|
415
|
+
"type": "object",
|
|
416
|
+
"properties": {
|
|
417
|
+
"continuation_token": {
|
|
418
|
+
"type": "string",
|
|
419
|
+
"description": "continuation_token"
|
|
420
|
+
},
|
|
421
|
+
"limit": {
|
|
422
|
+
"type": "number",
|
|
423
|
+
"description": "limit"
|
|
424
|
+
},
|
|
425
|
+
"user_id": {
|
|
426
|
+
"type": "string",
|
|
427
|
+
"description": "user_id"
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"required": [
|
|
431
|
+
"continuation_token",
|
|
432
|
+
"user_id"
|
|
433
|
+
]
|
|
434
|
+
},
|
|
435
|
+
execute: async (input) => {
|
|
436
|
+
const key = await ensureApiKey()
|
|
437
|
+
const params = parseToolInput(input)
|
|
438
|
+
return callSuperagnt(key, 'GET', '/user/likes/continuation', params)
|
|
439
|
+
},
|
|
440
|
+
})
|
|
441
|
+
|
|
442
|
+
api.registerTool({
|
|
443
|
+
name: 'superagnt_x_user_likes_continuation_post',
|
|
444
|
+
description: "Continuation User's Likes",
|
|
445
|
+
inputSchema: {
|
|
446
|
+
"type": "object",
|
|
447
|
+
"properties": {
|
|
448
|
+
"user_id": {
|
|
449
|
+
"type": "integer",
|
|
450
|
+
"description": "user_id"
|
|
451
|
+
},
|
|
452
|
+
"continuation_token": {
|
|
453
|
+
"type": "string",
|
|
454
|
+
"description": "continuation_token"
|
|
455
|
+
},
|
|
456
|
+
"limit": {
|
|
457
|
+
"type": "integer",
|
|
458
|
+
"description": "limit"
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
execute: async (input) => {
|
|
463
|
+
const key = await ensureApiKey()
|
|
464
|
+
const params = parseToolInput(input)
|
|
465
|
+
return callSuperagnt(key, 'POST', '/user/likes/continuation', undefined, params)
|
|
466
|
+
},
|
|
467
|
+
})
|
|
468
|
+
|
|
469
|
+
api.registerTool({
|
|
470
|
+
name: 'superagnt_x_User_s_Likes_get__user_likes',
|
|
471
|
+
description: "User's Likes",
|
|
472
|
+
inputSchema: {
|
|
473
|
+
"type": "object",
|
|
474
|
+
"properties": {
|
|
475
|
+
"user_id": {
|
|
476
|
+
"type": "string",
|
|
477
|
+
"description": "user_id"
|
|
478
|
+
},
|
|
479
|
+
"limit": {
|
|
480
|
+
"type": "number",
|
|
481
|
+
"description": "limit"
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"required": [
|
|
485
|
+
"user_id"
|
|
486
|
+
]
|
|
487
|
+
},
|
|
488
|
+
execute: async (input) => {
|
|
489
|
+
const key = await ensureApiKey()
|
|
490
|
+
const params = parseToolInput(input)
|
|
491
|
+
return callSuperagnt(key, 'GET', '/user/likes', params)
|
|
492
|
+
},
|
|
493
|
+
})
|
|
494
|
+
|
|
495
|
+
api.registerTool({
|
|
496
|
+
name: 'superagnt_x_User_s_Likes_post__user_likes',
|
|
497
|
+
description: "User's Likes",
|
|
498
|
+
inputSchema: {
|
|
499
|
+
"type": "object",
|
|
500
|
+
"properties": {
|
|
501
|
+
"user_id": {
|
|
502
|
+
"type": "integer",
|
|
503
|
+
"description": "user_id"
|
|
504
|
+
},
|
|
505
|
+
"limit": {
|
|
506
|
+
"type": "integer",
|
|
507
|
+
"description": "limit"
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
execute: async (input) => {
|
|
512
|
+
const key = await ensureApiKey()
|
|
513
|
+
const params = parseToolInput(input)
|
|
514
|
+
return callSuperagnt(key, 'POST', '/user/likes', undefined, params)
|
|
515
|
+
},
|
|
516
|
+
})
|
|
517
|
+
|
|
518
|
+
api.registerTool({
|
|
519
|
+
name: 'superagnt_x_user_followers_continuation_get',
|
|
520
|
+
description: "Continuation User's Followers",
|
|
521
|
+
inputSchema: {
|
|
522
|
+
"type": "object",
|
|
523
|
+
"properties": {
|
|
524
|
+
"user_id": {
|
|
525
|
+
"type": "string",
|
|
526
|
+
"description": "user_id"
|
|
527
|
+
},
|
|
528
|
+
"continuation_token": {
|
|
529
|
+
"type": "string",
|
|
530
|
+
"description": "continuation_token"
|
|
531
|
+
},
|
|
532
|
+
"limit": {
|
|
533
|
+
"type": "number",
|
|
534
|
+
"description": "limit"
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"required": [
|
|
538
|
+
"user_id",
|
|
539
|
+
"continuation_token"
|
|
540
|
+
]
|
|
541
|
+
},
|
|
542
|
+
execute: async (input) => {
|
|
543
|
+
const key = await ensureApiKey()
|
|
544
|
+
const params = parseToolInput(input)
|
|
545
|
+
return callSuperagnt(key, 'GET', '/user/followers/continuation', params)
|
|
546
|
+
},
|
|
547
|
+
})
|
|
548
|
+
|
|
549
|
+
api.registerTool({
|
|
550
|
+
name: 'superagnt_x_user_followers_continuation_post',
|
|
551
|
+
description: "Continuation User's Followers",
|
|
552
|
+
inputSchema: {
|
|
553
|
+
"type": "object",
|
|
554
|
+
"properties": {
|
|
555
|
+
"user_id": {
|
|
556
|
+
"type": "integer",
|
|
557
|
+
"description": "user_id"
|
|
558
|
+
},
|
|
559
|
+
"continuation_token": {
|
|
560
|
+
"type": "string",
|
|
561
|
+
"description": "continuation_token"
|
|
562
|
+
},
|
|
563
|
+
"limit": {
|
|
564
|
+
"type": "integer",
|
|
565
|
+
"description": "limit"
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
execute: async (input) => {
|
|
570
|
+
const key = await ensureApiKey()
|
|
571
|
+
const params = parseToolInput(input)
|
|
572
|
+
return callSuperagnt(key, 'POST', '/user/followers/continuation', undefined, params)
|
|
573
|
+
},
|
|
574
|
+
})
|
|
575
|
+
|
|
576
|
+
api.registerTool({
|
|
577
|
+
name: 'superagnt_x_User_s_Followers_get__user_followers',
|
|
578
|
+
description: "User's Followers",
|
|
579
|
+
inputSchema: {
|
|
580
|
+
"type": "object",
|
|
581
|
+
"properties": {
|
|
582
|
+
"limit": {
|
|
583
|
+
"type": "number",
|
|
584
|
+
"description": "limit"
|
|
585
|
+
},
|
|
586
|
+
"user_id": {
|
|
587
|
+
"type": "string",
|
|
588
|
+
"description": "user_id"
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
"required": [
|
|
592
|
+
"user_id"
|
|
593
|
+
]
|
|
594
|
+
},
|
|
595
|
+
execute: async (input) => {
|
|
596
|
+
const key = await ensureApiKey()
|
|
597
|
+
const params = parseToolInput(input)
|
|
598
|
+
return callSuperagnt(key, 'GET', '/user/followers', params)
|
|
599
|
+
},
|
|
600
|
+
})
|
|
601
|
+
|
|
602
|
+
api.registerTool({
|
|
603
|
+
name: 'superagnt_x_User_s_Followers_post__user_followers',
|
|
604
|
+
description: "User's Followers",
|
|
605
|
+
inputSchema: {
|
|
606
|
+
"type": "object",
|
|
607
|
+
"properties": {
|
|
608
|
+
"user_id": {
|
|
609
|
+
"type": "integer",
|
|
610
|
+
"description": "user_id"
|
|
611
|
+
},
|
|
612
|
+
"limit": {
|
|
613
|
+
"type": "integer",
|
|
614
|
+
"description": "limit"
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
execute: async (input) => {
|
|
619
|
+
const key = await ensureApiKey()
|
|
620
|
+
const params = parseToolInput(input)
|
|
621
|
+
return callSuperagnt(key, 'POST', '/user/followers', undefined, params)
|
|
622
|
+
},
|
|
623
|
+
})
|
|
624
|
+
|
|
625
|
+
api.registerTool({
|
|
626
|
+
name: 'superagnt_x_user_following_continuation_get',
|
|
627
|
+
description: "User's Following Continuation",
|
|
628
|
+
inputSchema: {
|
|
629
|
+
"type": "object",
|
|
630
|
+
"properties": {
|
|
631
|
+
"continuation_token": {
|
|
632
|
+
"type": "string",
|
|
633
|
+
"description": "continuation_token"
|
|
634
|
+
},
|
|
635
|
+
"limit": {
|
|
636
|
+
"type": "number",
|
|
637
|
+
"description": "limit"
|
|
638
|
+
},
|
|
639
|
+
"user_id": {
|
|
640
|
+
"type": "string",
|
|
641
|
+
"description": "user_id"
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
"required": [
|
|
645
|
+
"continuation_token",
|
|
646
|
+
"user_id"
|
|
647
|
+
]
|
|
648
|
+
},
|
|
649
|
+
execute: async (input) => {
|
|
650
|
+
const key = await ensureApiKey()
|
|
651
|
+
const params = parseToolInput(input)
|
|
652
|
+
return callSuperagnt(key, 'GET', '/user/following/continuation', params)
|
|
653
|
+
},
|
|
654
|
+
})
|
|
655
|
+
|
|
656
|
+
api.registerTool({
|
|
657
|
+
name: 'superagnt_x_user_following_continuation_post',
|
|
658
|
+
description: "User's Following Continuation",
|
|
659
|
+
inputSchema: {
|
|
660
|
+
"type": "object",
|
|
661
|
+
"properties": {
|
|
662
|
+
"user_id": {
|
|
663
|
+
"type": "integer",
|
|
664
|
+
"description": "user_id"
|
|
665
|
+
},
|
|
666
|
+
"continuation_token": {
|
|
667
|
+
"type": "string",
|
|
668
|
+
"description": "continuation_token"
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
execute: async (input) => {
|
|
673
|
+
const key = await ensureApiKey()
|
|
674
|
+
const params = parseToolInput(input)
|
|
675
|
+
return callSuperagnt(key, 'POST', '/user/following/continuation', undefined, params)
|
|
676
|
+
},
|
|
677
|
+
})
|
|
678
|
+
|
|
679
|
+
api.registerTool({
|
|
680
|
+
name: 'superagnt_x_User_s_Tweets_get__user_tweets',
|
|
681
|
+
description: "User's Tweets",
|
|
682
|
+
inputSchema: {
|
|
683
|
+
"type": "object",
|
|
684
|
+
"properties": {
|
|
685
|
+
"include_pinned": {
|
|
686
|
+
"type": "boolean",
|
|
687
|
+
"description": "include_pinned"
|
|
688
|
+
},
|
|
689
|
+
"limit": {
|
|
690
|
+
"type": "number",
|
|
691
|
+
"description": "limit"
|
|
692
|
+
},
|
|
693
|
+
"user_id": {
|
|
694
|
+
"type": "string",
|
|
695
|
+
"description": "user_id"
|
|
696
|
+
},
|
|
697
|
+
"include_replies": {
|
|
698
|
+
"type": "boolean",
|
|
699
|
+
"description": "include_replies"
|
|
700
|
+
},
|
|
701
|
+
"username": {
|
|
702
|
+
"type": "string",
|
|
703
|
+
"description": "username"
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
execute: async (input) => {
|
|
708
|
+
const key = await ensureApiKey()
|
|
709
|
+
const params = parseToolInput(input)
|
|
710
|
+
return callSuperagnt(key, 'GET', '/user/tweets', params)
|
|
711
|
+
},
|
|
712
|
+
})
|
|
713
|
+
|
|
714
|
+
api.registerTool({
|
|
715
|
+
name: 'superagnt_x_User_s_Tweets_post__user_tweets',
|
|
716
|
+
description: "User's Tweets",
|
|
717
|
+
inputSchema: {
|
|
718
|
+
"type": "object",
|
|
719
|
+
"properties": {
|
|
720
|
+
"username": {
|
|
721
|
+
"type": "string",
|
|
722
|
+
"description": "username"
|
|
723
|
+
},
|
|
724
|
+
"user_id": {
|
|
725
|
+
"type": "string",
|
|
726
|
+
"description": "user_id"
|
|
727
|
+
},
|
|
728
|
+
"include_replies": {
|
|
729
|
+
"type": "boolean",
|
|
730
|
+
"description": "include_replies"
|
|
731
|
+
},
|
|
732
|
+
"include_pinned": {
|
|
733
|
+
"type": "boolean",
|
|
734
|
+
"description": "include_pinned"
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
execute: async (input) => {
|
|
739
|
+
const key = await ensureApiKey()
|
|
740
|
+
const params = parseToolInput(input)
|
|
741
|
+
return callSuperagnt(key, 'POST', '/user/tweets', undefined, params)
|
|
742
|
+
},
|
|
743
|
+
})
|
|
744
|
+
|
|
745
|
+
api.registerTool({
|
|
746
|
+
name: 'superagnt_x_user_tweets_continuation_get',
|
|
747
|
+
description: "User's Tweets Continuation",
|
|
748
|
+
inputSchema: {
|
|
749
|
+
"type": "object",
|
|
750
|
+
"properties": {
|
|
751
|
+
"username": {
|
|
752
|
+
"type": "string",
|
|
753
|
+
"description": "username"
|
|
754
|
+
},
|
|
755
|
+
"limit": {
|
|
756
|
+
"type": "number",
|
|
757
|
+
"description": "limit"
|
|
758
|
+
},
|
|
759
|
+
"include_replies": {
|
|
760
|
+
"type": "boolean",
|
|
761
|
+
"description": "include_replies"
|
|
762
|
+
},
|
|
763
|
+
"continuation_token": {
|
|
764
|
+
"type": "string",
|
|
765
|
+
"description": "continuation_token"
|
|
766
|
+
},
|
|
767
|
+
"user_id": {
|
|
768
|
+
"type": "string",
|
|
769
|
+
"description": "user_id"
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
"required": [
|
|
773
|
+
"continuation_token"
|
|
774
|
+
]
|
|
775
|
+
},
|
|
776
|
+
execute: async (input) => {
|
|
777
|
+
const key = await ensureApiKey()
|
|
778
|
+
const params = parseToolInput(input)
|
|
779
|
+
return callSuperagnt(key, 'GET', '/user/tweets/continuation', params)
|
|
780
|
+
},
|
|
781
|
+
})
|
|
782
|
+
|
|
783
|
+
api.registerTool({
|
|
784
|
+
name: 'superagnt_x_user_tweets_continuation_post',
|
|
785
|
+
description: "User's Tweets Continuation",
|
|
786
|
+
inputSchema: {
|
|
787
|
+
"type": "object",
|
|
788
|
+
"properties": {
|
|
789
|
+
"username": {
|
|
790
|
+
"type": "string",
|
|
791
|
+
"description": "username"
|
|
792
|
+
},
|
|
793
|
+
"limit": {
|
|
794
|
+
"type": "integer",
|
|
795
|
+
"description": "limit"
|
|
796
|
+
},
|
|
797
|
+
"continuation_token": {
|
|
798
|
+
"type": "string",
|
|
799
|
+
"description": "continuation_token"
|
|
800
|
+
},
|
|
801
|
+
"user_id": {
|
|
802
|
+
"type": "string",
|
|
803
|
+
"description": "user_id"
|
|
804
|
+
},
|
|
805
|
+
"include_replies": {
|
|
806
|
+
"type": "boolean",
|
|
807
|
+
"description": "include_replies"
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
execute: async (input) => {
|
|
812
|
+
const key = await ensureApiKey()
|
|
813
|
+
const params = parseToolInput(input)
|
|
814
|
+
return callSuperagnt(key, 'POST', '/user/tweets/continuation', undefined, params)
|
|
815
|
+
},
|
|
816
|
+
})
|
|
817
|
+
|
|
818
|
+
api.registerTool({
|
|
819
|
+
name: 'superagnt_x_User_Details_get__user_details',
|
|
820
|
+
description: "User Details",
|
|
821
|
+
inputSchema: {
|
|
822
|
+
"type": "object",
|
|
823
|
+
"properties": {
|
|
824
|
+
"username": {
|
|
825
|
+
"type": "string",
|
|
826
|
+
"description": "username"
|
|
827
|
+
},
|
|
828
|
+
"user_id": {
|
|
829
|
+
"type": "string",
|
|
830
|
+
"description": "user_id"
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
execute: async (input) => {
|
|
835
|
+
const key = await ensureApiKey()
|
|
836
|
+
const params = parseToolInput(input)
|
|
837
|
+
return callSuperagnt(key, 'GET', '/user/details', params)
|
|
838
|
+
},
|
|
839
|
+
})
|
|
840
|
+
|
|
841
|
+
api.registerTool({
|
|
842
|
+
name: 'superagnt_x_User_Details_post__user_details',
|
|
843
|
+
description: "User Details",
|
|
844
|
+
inputSchema: {
|
|
845
|
+
"type": "object",
|
|
846
|
+
"properties": {
|
|
847
|
+
"username": {
|
|
848
|
+
"type": "string",
|
|
849
|
+
"description": "username"
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
execute: async (input) => {
|
|
854
|
+
const key = await ensureApiKey()
|
|
855
|
+
const params = parseToolInput(input)
|
|
856
|
+
return callSuperagnt(key, 'POST', '/user/details', undefined, params)
|
|
857
|
+
},
|
|
858
|
+
})
|
|
859
|
+
|
|
860
|
+
api.registerTool({
|
|
861
|
+
name: 'superagnt_x_User_About_get__user_about',
|
|
862
|
+
description: "User About",
|
|
863
|
+
inputSchema: {
|
|
864
|
+
"type": "object",
|
|
865
|
+
"properties": {
|
|
866
|
+
"username": {
|
|
867
|
+
"type": "string",
|
|
868
|
+
"description": "username"
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
"required": [
|
|
872
|
+
"username"
|
|
873
|
+
]
|
|
874
|
+
},
|
|
875
|
+
execute: async (input) => {
|
|
876
|
+
const key = await ensureApiKey()
|
|
877
|
+
const params = parseToolInput(input)
|
|
878
|
+
return callSuperagnt(key, 'GET', '/user/about', params)
|
|
879
|
+
},
|
|
880
|
+
})
|
|
881
|
+
|
|
882
|
+
api.registerTool({
|
|
883
|
+
name: 'superagnt_x_tweet_replies_continuation_get',
|
|
884
|
+
description: "Tweet Replies Continuation",
|
|
885
|
+
inputSchema: {
|
|
886
|
+
"type": "object",
|
|
887
|
+
"properties": {
|
|
888
|
+
"continuation_token": {
|
|
889
|
+
"type": "string",
|
|
890
|
+
"description": "continuation_token"
|
|
891
|
+
},
|
|
892
|
+
"tweet_id": {
|
|
893
|
+
"type": "string",
|
|
894
|
+
"description": "tweet_id"
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
"required": [
|
|
898
|
+
"continuation_token",
|
|
899
|
+
"tweet_id"
|
|
900
|
+
]
|
|
901
|
+
},
|
|
902
|
+
execute: async (input) => {
|
|
903
|
+
const key = await ensureApiKey()
|
|
904
|
+
const params = parseToolInput(input)
|
|
905
|
+
return callSuperagnt(key, 'GET', '/tweet/replies/continuation', params)
|
|
906
|
+
},
|
|
907
|
+
})
|
|
908
|
+
|
|
909
|
+
api.registerTool({
|
|
910
|
+
name: 'superagnt_x_tweet_replies_continuation_post',
|
|
911
|
+
description: "Tweet Replies Continuation",
|
|
912
|
+
inputSchema: {
|
|
913
|
+
"type": "object",
|
|
914
|
+
"properties": {
|
|
915
|
+
"tweet_id": {
|
|
916
|
+
"type": "string",
|
|
917
|
+
"description": "tweet_id"
|
|
918
|
+
},
|
|
919
|
+
"continuation_token": {
|
|
920
|
+
"type": "string",
|
|
921
|
+
"description": "continuation_token"
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
execute: async (input) => {
|
|
926
|
+
const key = await ensureApiKey()
|
|
927
|
+
const params = parseToolInput(input)
|
|
928
|
+
return callSuperagnt(key, 'POST', '/tweet/replies/continuation', undefined, params)
|
|
929
|
+
},
|
|
930
|
+
})
|
|
931
|
+
|
|
932
|
+
api.registerTool({
|
|
933
|
+
name: 'superagnt_x_tweet_favoriters_continuation_get',
|
|
934
|
+
description: "Tweet User Favoriters Continuation",
|
|
935
|
+
inputSchema: {
|
|
936
|
+
"type": "object",
|
|
937
|
+
"properties": {
|
|
938
|
+
"continuation_token": {
|
|
939
|
+
"type": "string",
|
|
940
|
+
"description": "continuation_token"
|
|
941
|
+
},
|
|
942
|
+
"tweet_id": {
|
|
943
|
+
"type": "string",
|
|
944
|
+
"description": "tweet_id"
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"required": [
|
|
948
|
+
"continuation_token",
|
|
949
|
+
"tweet_id"
|
|
950
|
+
]
|
|
951
|
+
},
|
|
952
|
+
execute: async (input) => {
|
|
953
|
+
const key = await ensureApiKey()
|
|
954
|
+
const params = parseToolInput(input)
|
|
955
|
+
return callSuperagnt(key, 'GET', '/tweet/favoriters/continuation', params)
|
|
956
|
+
},
|
|
957
|
+
})
|
|
958
|
+
|
|
959
|
+
api.registerTool({
|
|
960
|
+
name: 'superagnt_x_tweet_retweets_continuation_get',
|
|
961
|
+
description: "Tweet User Retweets Continuation",
|
|
962
|
+
inputSchema: {
|
|
963
|
+
"type": "object",
|
|
964
|
+
"properties": {
|
|
965
|
+
"continuation_token": {
|
|
966
|
+
"type": "string",
|
|
967
|
+
"description": "continuation_token"
|
|
968
|
+
},
|
|
969
|
+
"tweet_id": {
|
|
970
|
+
"type": "string",
|
|
971
|
+
"description": "tweet_id"
|
|
972
|
+
},
|
|
973
|
+
"limit": {
|
|
974
|
+
"type": "string",
|
|
975
|
+
"description": "limit"
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
"required": [
|
|
979
|
+
"continuation_token",
|
|
980
|
+
"tweet_id"
|
|
981
|
+
]
|
|
982
|
+
},
|
|
983
|
+
execute: async (input) => {
|
|
984
|
+
const key = await ensureApiKey()
|
|
985
|
+
const params = parseToolInput(input)
|
|
986
|
+
return callSuperagnt(key, 'GET', '/tweet/retweets/continuation', params)
|
|
987
|
+
},
|
|
988
|
+
})
|
|
989
|
+
|
|
990
|
+
api.registerTool({
|
|
991
|
+
name: 'superagnt_x_Tweet_Details_get__tweet_details',
|
|
992
|
+
description: "Tweet Details",
|
|
993
|
+
inputSchema: {
|
|
994
|
+
"type": "object",
|
|
995
|
+
"properties": {
|
|
996
|
+
"tweet_id": {
|
|
997
|
+
"type": "string",
|
|
998
|
+
"description": "tweet_id"
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
"required": [
|
|
1002
|
+
"tweet_id"
|
|
1003
|
+
]
|
|
1004
|
+
},
|
|
1005
|
+
execute: async (input) => {
|
|
1006
|
+
const key = await ensureApiKey()
|
|
1007
|
+
const params = parseToolInput(input)
|
|
1008
|
+
return callSuperagnt(key, 'GET', '/tweet/details', params)
|
|
1009
|
+
},
|
|
1010
|
+
})
|
|
1011
|
+
|
|
1012
|
+
api.registerTool({
|
|
1013
|
+
name: 'superagnt_x_Tweet_Details_post__tweet_details',
|
|
1014
|
+
description: "Tweet Details",
|
|
1015
|
+
inputSchema: {
|
|
1016
|
+
"type": "object",
|
|
1017
|
+
"properties": {
|
|
1018
|
+
"tweet_id": {
|
|
1019
|
+
"type": "string",
|
|
1020
|
+
"description": "tweet_id"
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
execute: async (input) => {
|
|
1025
|
+
const key = await ensureApiKey()
|
|
1026
|
+
const params = parseToolInput(input)
|
|
1027
|
+
return callSuperagnt(key, 'POST', '/tweet/details', undefined, params)
|
|
1028
|
+
},
|
|
1029
|
+
})
|
|
1030
|
+
|
|
1031
|
+
api.registerTool({
|
|
1032
|
+
name: 'superagnt_x_Tweet_User_Favoriters_get__tweet_favoriters',
|
|
1033
|
+
description: "Tweet User Favoriters",
|
|
1034
|
+
inputSchema: {
|
|
1035
|
+
"type": "object",
|
|
1036
|
+
"properties": {
|
|
1037
|
+
"tweet_id": {
|
|
1038
|
+
"type": "string",
|
|
1039
|
+
"description": "tweet_id"
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
"required": [
|
|
1043
|
+
"tweet_id"
|
|
1044
|
+
]
|
|
1045
|
+
},
|
|
1046
|
+
execute: async (input) => {
|
|
1047
|
+
const key = await ensureApiKey()
|
|
1048
|
+
const params = parseToolInput(input)
|
|
1049
|
+
return callSuperagnt(key, 'GET', '/tweet/favoriters', params)
|
|
1050
|
+
},
|
|
1051
|
+
})
|
|
1052
|
+
|
|
1053
|
+
api.registerTool({
|
|
1054
|
+
name: 'superagnt_x_Tweet_User_Retweets_get__tweet_retweets',
|
|
1055
|
+
description: "Tweet User Retweets",
|
|
1056
|
+
inputSchema: {
|
|
1057
|
+
"type": "object",
|
|
1058
|
+
"properties": {
|
|
1059
|
+
"tweet_id": {
|
|
1060
|
+
"type": "string",
|
|
1061
|
+
"description": "tweet_id"
|
|
1062
|
+
},
|
|
1063
|
+
"limit": {
|
|
1064
|
+
"type": "string",
|
|
1065
|
+
"description": "limit"
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
"required": [
|
|
1069
|
+
"tweet_id"
|
|
1070
|
+
]
|
|
1071
|
+
},
|
|
1072
|
+
execute: async (input) => {
|
|
1073
|
+
const key = await ensureApiKey()
|
|
1074
|
+
const params = parseToolInput(input)
|
|
1075
|
+
return callSuperagnt(key, 'GET', '/tweet/retweets', params)
|
|
1076
|
+
},
|
|
1077
|
+
})
|
|
1078
|
+
|
|
1079
|
+
api.registerTool({
|
|
1080
|
+
name: 'superagnt_x_Tweet_Replies_get__tweet_replies',
|
|
1081
|
+
description: "Tweet Replies",
|
|
1082
|
+
inputSchema: {
|
|
1083
|
+
"type": "object",
|
|
1084
|
+
"properties": {
|
|
1085
|
+
"tweet_id": {
|
|
1086
|
+
"type": "string",
|
|
1087
|
+
"description": "tweet_id"
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
"required": [
|
|
1091
|
+
"tweet_id"
|
|
1092
|
+
]
|
|
1093
|
+
},
|
|
1094
|
+
execute: async (input) => {
|
|
1095
|
+
const key = await ensureApiKey()
|
|
1096
|
+
const params = parseToolInput(input)
|
|
1097
|
+
return callSuperagnt(key, 'GET', '/tweet/replies', params)
|
|
1098
|
+
},
|
|
1099
|
+
})
|
|
1100
|
+
|
|
1101
|
+
api.registerTool({
|
|
1102
|
+
name: 'superagnt_x_Tweet_Replies_post__tweet_replies',
|
|
1103
|
+
description: "Tweet Replies",
|
|
1104
|
+
inputSchema: {
|
|
1105
|
+
"type": "object",
|
|
1106
|
+
"properties": {
|
|
1107
|
+
"tweet_id": {
|
|
1108
|
+
"type": "string",
|
|
1109
|
+
"description": "tweet_id"
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
execute: async (input) => {
|
|
1114
|
+
const key = await ensureApiKey()
|
|
1115
|
+
const params = parseToolInput(input)
|
|
1116
|
+
return callSuperagnt(key, 'POST', '/tweet/replies', undefined, params)
|
|
1117
|
+
},
|
|
1118
|
+
})
|
|
1119
|
+
|
|
1120
|
+
api.registerTool({
|
|
1121
|
+
name: 'superagnt_x_User_s_Following_get__user_following',
|
|
1122
|
+
description: "User's Following",
|
|
1123
|
+
inputSchema: {
|
|
1124
|
+
"type": "object",
|
|
1125
|
+
"properties": {
|
|
1126
|
+
"user_id": {
|
|
1127
|
+
"type": "string",
|
|
1128
|
+
"description": "user_id"
|
|
1129
|
+
},
|
|
1130
|
+
"limit": {
|
|
1131
|
+
"type": "number",
|
|
1132
|
+
"description": "limit"
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
"required": [
|
|
1136
|
+
"user_id"
|
|
1137
|
+
]
|
|
1138
|
+
},
|
|
1139
|
+
execute: async (input) => {
|
|
1140
|
+
const key = await ensureApiKey()
|
|
1141
|
+
const params = parseToolInput(input)
|
|
1142
|
+
return callSuperagnt(key, 'GET', '/user/following', params)
|
|
1143
|
+
},
|
|
1144
|
+
})
|
|
1145
|
+
|
|
1146
|
+
api.registerTool({
|
|
1147
|
+
name: 'superagnt_x_User_s_Following_post__user_following',
|
|
1148
|
+
description: "User's Following",
|
|
1149
|
+
inputSchema: {
|
|
1150
|
+
"type": "object",
|
|
1151
|
+
"properties": {
|
|
1152
|
+
"user_id": {
|
|
1153
|
+
"type": "integer",
|
|
1154
|
+
"description": "user_id"
|
|
1155
|
+
},
|
|
1156
|
+
"limit": {
|
|
1157
|
+
"type": "integer",
|
|
1158
|
+
"description": "limit"
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
},
|
|
1162
|
+
execute: async (input) => {
|
|
1163
|
+
const key = await ensureApiKey()
|
|
1164
|
+
const params = parseToolInput(input)
|
|
1165
|
+
return callSuperagnt(key, 'POST', '/user/following', undefined, params)
|
|
1166
|
+
},
|
|
1167
|
+
})
|
|
1168
|
+
|
|
1169
|
+
api.registerTool({
|
|
1170
|
+
name: 'superagnt_x_lists_tweets_continuation_get',
|
|
1171
|
+
description: "Lists Tweets Continuation",
|
|
1172
|
+
inputSchema: {
|
|
1173
|
+
"type": "object",
|
|
1174
|
+
"properties": {
|
|
1175
|
+
"limit": {
|
|
1176
|
+
"type": "number",
|
|
1177
|
+
"description": "limit"
|
|
1178
|
+
},
|
|
1179
|
+
"list_id": {
|
|
1180
|
+
"type": "string",
|
|
1181
|
+
"description": "list_id"
|
|
1182
|
+
},
|
|
1183
|
+
"continuation_token": {
|
|
1184
|
+
"type": "string",
|
|
1185
|
+
"description": "continuation_token"
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
"required": [
|
|
1189
|
+
"list_id",
|
|
1190
|
+
"continuation_token"
|
|
1191
|
+
]
|
|
1192
|
+
},
|
|
1193
|
+
execute: async (input) => {
|
|
1194
|
+
const key = await ensureApiKey()
|
|
1195
|
+
const params = parseToolInput(input)
|
|
1196
|
+
return callSuperagnt(key, 'GET', '/lists/tweets/continuation', params)
|
|
1197
|
+
},
|
|
1198
|
+
})
|
|
1199
|
+
|
|
1200
|
+
api.registerTool({
|
|
1201
|
+
name: 'superagnt_x_search_continuation_get',
|
|
1202
|
+
description: "Search Continuation",
|
|
1203
|
+
inputSchema: {
|
|
1204
|
+
"type": "object",
|
|
1205
|
+
"properties": {
|
|
1206
|
+
"end_date": {
|
|
1207
|
+
"type": "string",
|
|
1208
|
+
"description": "end_date"
|
|
1209
|
+
},
|
|
1210
|
+
"min_likes": {
|
|
1211
|
+
"type": "number",
|
|
1212
|
+
"description": "min_likes"
|
|
1213
|
+
},
|
|
1214
|
+
"start_date": {
|
|
1215
|
+
"type": "string",
|
|
1216
|
+
"description": "YYYY-MM-DD"
|
|
1217
|
+
},
|
|
1218
|
+
"min_replies": {
|
|
1219
|
+
"type": "number",
|
|
1220
|
+
"description": "min_replies"
|
|
1221
|
+
},
|
|
1222
|
+
"continuation_token": {
|
|
1223
|
+
"type": "string",
|
|
1224
|
+
"description": "continuation_token"
|
|
1225
|
+
},
|
|
1226
|
+
"language": {
|
|
1227
|
+
"type": "string",
|
|
1228
|
+
"description": "language"
|
|
1229
|
+
},
|
|
1230
|
+
"limit": {
|
|
1231
|
+
"type": "number",
|
|
1232
|
+
"description": "limit"
|
|
1233
|
+
},
|
|
1234
|
+
"query": {
|
|
1235
|
+
"type": "string",
|
|
1236
|
+
"description": "query"
|
|
1237
|
+
},
|
|
1238
|
+
"min_retweets": {
|
|
1239
|
+
"type": "number",
|
|
1240
|
+
"description": "min_retweets"
|
|
1241
|
+
},
|
|
1242
|
+
"section": {
|
|
1243
|
+
"type": "string",
|
|
1244
|
+
"description": "section"
|
|
1245
|
+
}
|
|
1246
|
+
},
|
|
1247
|
+
"required": [
|
|
1248
|
+
"continuation_token",
|
|
1249
|
+
"query"
|
|
1250
|
+
]
|
|
1251
|
+
},
|
|
1252
|
+
execute: async (input) => {
|
|
1253
|
+
const key = await ensureApiKey()
|
|
1254
|
+
const params = parseToolInput(input)
|
|
1255
|
+
return callSuperagnt(key, 'GET', '/search/search/continuation', params)
|
|
1256
|
+
},
|
|
1257
|
+
})
|
|
1258
|
+
|
|
1259
|
+
api.registerTool({
|
|
1260
|
+
name: 'superagnt_x_search_continuation_post',
|
|
1261
|
+
description: "Search Continuation",
|
|
1262
|
+
inputSchema: {
|
|
1263
|
+
"type": "object",
|
|
1264
|
+
"properties": {
|
|
1265
|
+
"query": {
|
|
1266
|
+
"type": "string",
|
|
1267
|
+
"description": "query"
|
|
1268
|
+
},
|
|
1269
|
+
"limit": {
|
|
1270
|
+
"type": "integer",
|
|
1271
|
+
"description": "limit"
|
|
1272
|
+
},
|
|
1273
|
+
"section": {
|
|
1274
|
+
"type": "string",
|
|
1275
|
+
"description": "section"
|
|
1276
|
+
},
|
|
1277
|
+
"language": {
|
|
1278
|
+
"type": "string",
|
|
1279
|
+
"description": "language"
|
|
1280
|
+
},
|
|
1281
|
+
"min_likes": {
|
|
1282
|
+
"type": "integer",
|
|
1283
|
+
"description": "min_likes"
|
|
1284
|
+
},
|
|
1285
|
+
"min_retweets": {
|
|
1286
|
+
"type": "integer",
|
|
1287
|
+
"description": "min_retweets"
|
|
1288
|
+
},
|
|
1289
|
+
"start_date": {
|
|
1290
|
+
"type": "string",
|
|
1291
|
+
"description": "start_date"
|
|
1292
|
+
},
|
|
1293
|
+
"continuation_token": {
|
|
1294
|
+
"type": "string",
|
|
1295
|
+
"description": "continuation_token"
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
execute: async (input) => {
|
|
1300
|
+
const key = await ensureApiKey()
|
|
1301
|
+
const params = parseToolInput(input)
|
|
1302
|
+
return callSuperagnt(key, 'POST', '/search/search/continuation', undefined, params)
|
|
1303
|
+
},
|
|
1304
|
+
})
|
|
1305
|
+
|
|
1306
|
+
api.registerTool({
|
|
1307
|
+
name: 'superagnt_x_ai_topic_classification',
|
|
1308
|
+
description: "Topic Classification",
|
|
1309
|
+
inputSchema: {
|
|
1310
|
+
"type": "object",
|
|
1311
|
+
"properties": {
|
|
1312
|
+
"text": {
|
|
1313
|
+
"type": "string",
|
|
1314
|
+
"description": "text"
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
"required": [
|
|
1318
|
+
"text"
|
|
1319
|
+
]
|
|
1320
|
+
},
|
|
1321
|
+
execute: async (input) => {
|
|
1322
|
+
const key = await ensureApiKey()
|
|
1323
|
+
const params = parseToolInput(input)
|
|
1324
|
+
return callSuperagnt(key, 'GET', '/ai/topic-classification', params)
|
|
1325
|
+
},
|
|
1326
|
+
})
|
|
1327
|
+
|
|
1328
|
+
api.registerTool({
|
|
1329
|
+
name: 'superagnt_x_Detect_post__translate_detect',
|
|
1330
|
+
description: "Detect",
|
|
1331
|
+
inputSchema: {
|
|
1332
|
+
"type": "object",
|
|
1333
|
+
"properties": {
|
|
1334
|
+
"text": {
|
|
1335
|
+
"type": "string",
|
|
1336
|
+
"description": "text"
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
},
|
|
1340
|
+
execute: async (input) => {
|
|
1341
|
+
const key = await ensureApiKey()
|
|
1342
|
+
const params = parseToolInput(input)
|
|
1343
|
+
return callSuperagnt(key, 'POST', '/translate/detect', undefined, params)
|
|
1344
|
+
},
|
|
1345
|
+
})
|
|
1346
|
+
|
|
1347
|
+
api.registerTool({
|
|
1348
|
+
name: 'superagnt_x_ai_named_entity_recognition',
|
|
1349
|
+
description: "Named Entity Recognition",
|
|
1350
|
+
inputSchema: {
|
|
1351
|
+
"type": "object",
|
|
1352
|
+
"properties": {
|
|
1353
|
+
"text": {
|
|
1354
|
+
"type": "string",
|
|
1355
|
+
"description": "text"
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1358
|
+
"required": [
|
|
1359
|
+
"text"
|
|
1360
|
+
]
|
|
1361
|
+
},
|
|
1362
|
+
execute: async (input) => {
|
|
1363
|
+
const key = await ensureApiKey()
|
|
1364
|
+
const params = parseToolInput(input)
|
|
1365
|
+
return callSuperagnt(key, 'GET', '/ai/named-entity-recognition', params)
|
|
1366
|
+
},
|
|
1367
|
+
})
|
|
1368
|
+
|
|
1369
|
+
api.registerTool({
|
|
1370
|
+
name: 'superagnt_x_Sentiment_Analysis_get__ai_sentiment_analysis',
|
|
1371
|
+
description: "Sentiment Analysis",
|
|
1372
|
+
inputSchema: {
|
|
1373
|
+
"type": "object",
|
|
1374
|
+
"properties": {
|
|
1375
|
+
"text": {
|
|
1376
|
+
"type": "string",
|
|
1377
|
+
"description": "text"
|
|
1378
|
+
}
|
|
1379
|
+
},
|
|
1380
|
+
"required": [
|
|
1381
|
+
"text"
|
|
1382
|
+
]
|
|
1383
|
+
},
|
|
1384
|
+
execute: async (input) => {
|
|
1385
|
+
const key = await ensureApiKey()
|
|
1386
|
+
const params = parseToolInput(input)
|
|
1387
|
+
return callSuperagnt(key, 'GET', '/ai/sentiment-analysis', params)
|
|
1388
|
+
},
|
|
1389
|
+
})
|
|
1390
|
+
|
|
1391
|
+
api.registerTool({
|
|
1392
|
+
name: 'superagnt_x_Translate_post__translate',
|
|
1393
|
+
description: "Translate",
|
|
1394
|
+
inputSchema: {
|
|
1395
|
+
"type": "object",
|
|
1396
|
+
"properties": {
|
|
1397
|
+
"dest": {
|
|
1398
|
+
"type": "string",
|
|
1399
|
+
"description": "dest"
|
|
1400
|
+
},
|
|
1401
|
+
"text": {
|
|
1402
|
+
"type": "string",
|
|
1403
|
+
"description": "text"
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
},
|
|
1407
|
+
execute: async (input) => {
|
|
1408
|
+
const key = await ensureApiKey()
|
|
1409
|
+
const params = parseToolInput(input)
|
|
1410
|
+
return callSuperagnt(key, 'POST', '/translate', undefined, params)
|
|
1411
|
+
},
|
|
1412
|
+
})
|
|
1413
|
+
|
|
1414
|
+
api.registerTool({
|
|
1415
|
+
name: 'superagnt_x_trends_available_locations',
|
|
1416
|
+
description: "Available Locations (Beta)",
|
|
1417
|
+
inputSchema: {
|
|
1418
|
+
"type": "object",
|
|
1419
|
+
"properties": {}
|
|
1420
|
+
},
|
|
1421
|
+
execute: async (input) => {
|
|
1422
|
+
const key = await ensureApiKey()
|
|
1423
|
+
const params = parseToolInput(input)
|
|
1424
|
+
return callSuperagnt(key, 'GET', '/trends/available', params)
|
|
1425
|
+
},
|
|
1426
|
+
})
|
|
1427
|
+
|
|
1428
|
+
api.registerTool({
|
|
1429
|
+
name: 'superagnt_x_Get_trends_near_a_location__Beta__get__trends',
|
|
1430
|
+
description: "Get trends near a location (Beta)",
|
|
1431
|
+
inputSchema: {
|
|
1432
|
+
"type": "object",
|
|
1433
|
+
"properties": {
|
|
1434
|
+
"woeid": {
|
|
1435
|
+
"type": "string",
|
|
1436
|
+
"description": "woeid"
|
|
1437
|
+
}
|
|
1438
|
+
},
|
|
1439
|
+
"required": [
|
|
1440
|
+
"woeid"
|
|
1441
|
+
]
|
|
1442
|
+
},
|
|
1443
|
+
execute: async (input) => {
|
|
1444
|
+
const key = await ensureApiKey()
|
|
1445
|
+
const params = parseToolInput(input)
|
|
1446
|
+
return callSuperagnt(key, 'GET', '/trends/', params)
|
|
1447
|
+
},
|
|
1448
|
+
})
|
|
1449
|
+
|
|
1450
|
+
api.registerTool({
|
|
1451
|
+
name: 'superagnt_x_Geo_Search___Beta__get__search_geo',
|
|
1452
|
+
description: "Geo Search (Beta)",
|
|
1453
|
+
inputSchema: {
|
|
1454
|
+
"type": "object",
|
|
1455
|
+
"properties": {
|
|
1456
|
+
"section": {
|
|
1457
|
+
"type": "string",
|
|
1458
|
+
"description": "section"
|
|
1459
|
+
},
|
|
1460
|
+
"language": {
|
|
1461
|
+
"type": "string",
|
|
1462
|
+
"description": "language"
|
|
1463
|
+
},
|
|
1464
|
+
"limit": {
|
|
1465
|
+
"type": "string",
|
|
1466
|
+
"description": "limit"
|
|
1467
|
+
},
|
|
1468
|
+
"query": {
|
|
1469
|
+
"type": "string",
|
|
1470
|
+
"description": "query"
|
|
1471
|
+
},
|
|
1472
|
+
"range": {
|
|
1473
|
+
"type": "string",
|
|
1474
|
+
"description": "range"
|
|
1475
|
+
},
|
|
1476
|
+
"longitude": {
|
|
1477
|
+
"type": "string",
|
|
1478
|
+
"description": "longitude"
|
|
1479
|
+
},
|
|
1480
|
+
"latitude": {
|
|
1481
|
+
"type": "string",
|
|
1482
|
+
"description": "latitude"
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1485
|
+
"required": [
|
|
1486
|
+
"query"
|
|
1487
|
+
]
|
|
1488
|
+
},
|
|
1489
|
+
execute: async (input) => {
|
|
1490
|
+
const key = await ensureApiKey()
|
|
1491
|
+
const params = parseToolInput(input)
|
|
1492
|
+
return callSuperagnt(key, 'GET', '/search/geo', params)
|
|
1493
|
+
},
|
|
1494
|
+
})
|
|
1495
|
+
|
|
1496
|
+
api.registerTool({
|
|
1497
|
+
name: 'superagnt_x_Lists_Tweets_get__lists_tweets',
|
|
1498
|
+
description: "Lists Tweets",
|
|
1499
|
+
inputSchema: {
|
|
1500
|
+
"type": "object",
|
|
1501
|
+
"properties": {
|
|
1502
|
+
"limit": {
|
|
1503
|
+
"type": "number",
|
|
1504
|
+
"description": "limit"
|
|
1505
|
+
},
|
|
1506
|
+
"list_id": {
|
|
1507
|
+
"type": "string",
|
|
1508
|
+
"description": "list_id"
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1511
|
+
"required": [
|
|
1512
|
+
"list_id"
|
|
1513
|
+
]
|
|
1514
|
+
},
|
|
1515
|
+
execute: async (input) => {
|
|
1516
|
+
const key = await ensureApiKey()
|
|
1517
|
+
const params = parseToolInput(input)
|
|
1518
|
+
return callSuperagnt(key, 'GET', '/lists/tweets', params)
|
|
1519
|
+
},
|
|
1520
|
+
})
|
|
1521
|
+
|
|
1522
|
+
api.registerTool({
|
|
1523
|
+
name: 'superagnt_x_Lists_Details_get__lists_details',
|
|
1524
|
+
description: "Lists Details",
|
|
1525
|
+
inputSchema: {
|
|
1526
|
+
"type": "object",
|
|
1527
|
+
"properties": {
|
|
1528
|
+
"list_id": {
|
|
1529
|
+
"type": "string",
|
|
1530
|
+
"description": "list_id"
|
|
1531
|
+
}
|
|
1532
|
+
},
|
|
1533
|
+
"required": [
|
|
1534
|
+
"list_id"
|
|
1535
|
+
]
|
|
1536
|
+
},
|
|
1537
|
+
execute: async (input) => {
|
|
1538
|
+
const key = await ensureApiKey()
|
|
1539
|
+
const params = parseToolInput(input)
|
|
1540
|
+
return callSuperagnt(key, 'GET', '/lists/details', params)
|
|
1541
|
+
},
|
|
1542
|
+
})
|
|
1543
|
+
|
|
1544
|
+
api.registerTool({
|
|
1545
|
+
name: 'superagnt_x_Search_get__search_search',
|
|
1546
|
+
description: "Search",
|
|
1547
|
+
inputSchema: {
|
|
1548
|
+
"type": "object",
|
|
1549
|
+
"properties": {
|
|
1550
|
+
"limit": {
|
|
1551
|
+
"type": "number",
|
|
1552
|
+
"description": "limit"
|
|
1553
|
+
},
|
|
1554
|
+
"language": {
|
|
1555
|
+
"type": "string",
|
|
1556
|
+
"description": "language"
|
|
1557
|
+
},
|
|
1558
|
+
"start_date": {
|
|
1559
|
+
"type": "string",
|
|
1560
|
+
"description": "YYYY-MM-DD"
|
|
1561
|
+
},
|
|
1562
|
+
"min_likes": {
|
|
1563
|
+
"type": "number",
|
|
1564
|
+
"description": "min_likes"
|
|
1565
|
+
},
|
|
1566
|
+
"min_retweets": {
|
|
1567
|
+
"type": "number",
|
|
1568
|
+
"description": "min_retweets"
|
|
1569
|
+
},
|
|
1570
|
+
"query": {
|
|
1571
|
+
"type": "string",
|
|
1572
|
+
"description": "query"
|
|
1573
|
+
},
|
|
1574
|
+
"end_date": {
|
|
1575
|
+
"type": "string",
|
|
1576
|
+
"description": "end_date"
|
|
1577
|
+
},
|
|
1578
|
+
"min_replies": {
|
|
1579
|
+
"type": "number",
|
|
1580
|
+
"description": "min_replies"
|
|
1581
|
+
},
|
|
1582
|
+
"section": {
|
|
1583
|
+
"type": "string",
|
|
1584
|
+
"description": "section"
|
|
1585
|
+
}
|
|
1586
|
+
},
|
|
1587
|
+
"required": [
|
|
1588
|
+
"query"
|
|
1589
|
+
]
|
|
1590
|
+
},
|
|
1591
|
+
execute: async (input) => {
|
|
1592
|
+
const key = await ensureApiKey()
|
|
1593
|
+
const params = parseToolInput(input)
|
|
1594
|
+
return callSuperagnt(key, 'GET', '/search/search', params)
|
|
1595
|
+
},
|
|
1596
|
+
})
|
|
1597
|
+
|
|
1598
|
+
api.registerTool({
|
|
1599
|
+
name: 'superagnt_x_Search_post__search_search',
|
|
1600
|
+
description: "Search",
|
|
1601
|
+
inputSchema: {
|
|
1602
|
+
"type": "object",
|
|
1603
|
+
"properties": {
|
|
1604
|
+
"query": {
|
|
1605
|
+
"type": "string",
|
|
1606
|
+
"description": "query"
|
|
1607
|
+
},
|
|
1608
|
+
"limit": {
|
|
1609
|
+
"type": "integer",
|
|
1610
|
+
"description": "limit"
|
|
1611
|
+
},
|
|
1612
|
+
"section": {
|
|
1613
|
+
"type": "string",
|
|
1614
|
+
"description": "section"
|
|
1615
|
+
},
|
|
1616
|
+
"language": {
|
|
1617
|
+
"type": "string",
|
|
1618
|
+
"description": "language"
|
|
1619
|
+
},
|
|
1620
|
+
"min_likes": {
|
|
1621
|
+
"type": "integer",
|
|
1622
|
+
"description": "min_likes"
|
|
1623
|
+
},
|
|
1624
|
+
"min_retweets": {
|
|
1625
|
+
"type": "integer",
|
|
1626
|
+
"description": "min_retweets"
|
|
1627
|
+
},
|
|
1628
|
+
"start_date": {
|
|
1629
|
+
"type": "string",
|
|
1630
|
+
"description": "start_date"
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
},
|
|
1634
|
+
execute: async (input) => {
|
|
1635
|
+
const key = await ensureApiKey()
|
|
1636
|
+
const params = parseToolInput(input)
|
|
1637
|
+
return callSuperagnt(key, 'POST', '/search/search', undefined, params)
|
|
1638
|
+
},
|
|
1639
|
+
})
|
|
1640
|
+
|
|
1641
|
+
api.registerTool({
|
|
1642
|
+
name: 'superagnt_x_Hashtag_get__hashtag_hashtag',
|
|
1643
|
+
description: "Hashtag",
|
|
1644
|
+
inputSchema: {
|
|
1645
|
+
"type": "object",
|
|
1646
|
+
"properties": {
|
|
1647
|
+
"section": {
|
|
1648
|
+
"type": "string",
|
|
1649
|
+
"description": "section"
|
|
1650
|
+
},
|
|
1651
|
+
"hashtag": {
|
|
1652
|
+
"type": "string",
|
|
1653
|
+
"description": "hashtag"
|
|
1654
|
+
},
|
|
1655
|
+
"limit": {
|
|
1656
|
+
"type": "string",
|
|
1657
|
+
"description": "limit"
|
|
1658
|
+
}
|
|
1659
|
+
},
|
|
1660
|
+
"required": [
|
|
1661
|
+
"hashtag"
|
|
1662
|
+
]
|
|
1663
|
+
},
|
|
1664
|
+
execute: async (input) => {
|
|
1665
|
+
const key = await ensureApiKey()
|
|
1666
|
+
const params = parseToolInput(input)
|
|
1667
|
+
return callSuperagnt(key, 'GET', '/hashtag/hashtag', params)
|
|
1668
|
+
},
|
|
1669
|
+
})
|
|
1670
|
+
|
|
1671
|
+
api.registerTool({
|
|
1672
|
+
name: 'superagnt_x_Hashtag_post__hashtag_hashtag',
|
|
1673
|
+
description: "Hashtag",
|
|
1674
|
+
inputSchema: {
|
|
1675
|
+
"type": "object",
|
|
1676
|
+
"properties": {
|
|
1677
|
+
"hashtag": {
|
|
1678
|
+
"type": "string",
|
|
1679
|
+
"description": "hashtag"
|
|
1680
|
+
},
|
|
1681
|
+
"limit": {
|
|
1682
|
+
"type": "integer",
|
|
1683
|
+
"description": "limit"
|
|
1684
|
+
},
|
|
1685
|
+
"section": {
|
|
1686
|
+
"type": "string",
|
|
1687
|
+
"description": "section"
|
|
1688
|
+
},
|
|
1689
|
+
"language": {
|
|
1690
|
+
"type": "string",
|
|
1691
|
+
"description": "language"
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
},
|
|
1695
|
+
execute: async (input) => {
|
|
1696
|
+
const key = await ensureApiKey()
|
|
1697
|
+
const params = parseToolInput(input)
|
|
1698
|
+
return callSuperagnt(key, 'POST', '/hashtag/hashtag', undefined, params)
|
|
1699
|
+
},
|
|
1700
|
+
})
|
|
1701
|
+
|
|
1702
|
+
api.registerTool({
|
|
1703
|
+
name: 'superagnt_x_hashtag_continuation_get',
|
|
1704
|
+
description: "Hashtag Continuation",
|
|
1705
|
+
inputSchema: {
|
|
1706
|
+
"type": "object",
|
|
1707
|
+
"properties": {
|
|
1708
|
+
"continuation_token": {
|
|
1709
|
+
"type": "string",
|
|
1710
|
+
"description": "continuation_token"
|
|
1711
|
+
},
|
|
1712
|
+
"hashtag": {
|
|
1713
|
+
"type": "string",
|
|
1714
|
+
"description": "hashtag"
|
|
1715
|
+
},
|
|
1716
|
+
"limit": {
|
|
1717
|
+
"type": "string",
|
|
1718
|
+
"description": "limit"
|
|
1719
|
+
},
|
|
1720
|
+
"section": {
|
|
1721
|
+
"type": "string",
|
|
1722
|
+
"description": "section"
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1725
|
+
"required": [
|
|
1726
|
+
"continuation_token",
|
|
1727
|
+
"hashtag"
|
|
1728
|
+
]
|
|
1729
|
+
},
|
|
1730
|
+
execute: async (input) => {
|
|
1731
|
+
const key = await ensureApiKey()
|
|
1732
|
+
const params = parseToolInput(input)
|
|
1733
|
+
return callSuperagnt(key, 'GET', '/hashtag/hashtag/continuation', params)
|
|
1734
|
+
},
|
|
1735
|
+
})
|
|
1736
|
+
|
|
1737
|
+
api.registerTool({
|
|
1738
|
+
name: 'superagnt_x_hashtag_continuation_post',
|
|
1739
|
+
description: "Hashtag Continuation",
|
|
1740
|
+
inputSchema: {
|
|
1741
|
+
"type": "object",
|
|
1742
|
+
"properties": {
|
|
1743
|
+
"hashtag": {
|
|
1744
|
+
"type": "string",
|
|
1745
|
+
"description": "hashtag"
|
|
1746
|
+
},
|
|
1747
|
+
"limit": {
|
|
1748
|
+
"type": "integer",
|
|
1749
|
+
"description": "limit"
|
|
1750
|
+
},
|
|
1751
|
+
"section": {
|
|
1752
|
+
"type": "string",
|
|
1753
|
+
"description": "section"
|
|
1754
|
+
},
|
|
1755
|
+
"language": {
|
|
1756
|
+
"type": "string",
|
|
1757
|
+
"description": "language"
|
|
1758
|
+
},
|
|
1759
|
+
"continuation_token": {
|
|
1760
|
+
"type": "string",
|
|
1761
|
+
"description": "continuation_token"
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
},
|
|
1765
|
+
execute: async (input) => {
|
|
1766
|
+
const key = await ensureApiKey()
|
|
1767
|
+
const params = parseToolInput(input)
|
|
1768
|
+
return callSuperagnt(key, 'POST', '/hashtag/hashtag/continuation', undefined, params)
|
|
1769
|
+
},
|
|
1770
|
+
})
|
|
1771
|
+
|
|
1772
|
+
promptState.toolCount = 52
|
|
1773
|
+
promptState.ready = true
|
|
1774
|
+
}
|