@oneshot-agent/mcp-server 0.35.0 → 0.37.0
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 +19 -19
- package/dist/index.js +1 -1
- package/dist/tools/annotations.js +26 -14
- package/dist/tools/browser.js +1 -1
- package/dist/tools/company.d.ts +4 -4
- package/dist/tools/company.js +8 -8
- package/dist/tools/compute.d.ts +3 -2
- package/dist/tools/compute.js +4 -4
- package/dist/tools/domains.js +1 -1
- package/dist/tools/email.js +2 -2
- package/dist/tools/enrichment.d.ts +6 -6
- package/dist/tools/enrichment.js +12 -12
- package/dist/tools/gov.d.ts +2 -2
- package/dist/tools/gov.js +4 -4
- package/dist/tools/index.js +39 -34
- package/dist/tools/linkedin.js +8 -6
- package/dist/tools/local.d.ts +4 -4
- package/dist/tools/local.js +9 -9
- package/dist/tools/lookup-manifest.generated.d.ts +34 -0
- package/dist/tools/lookup-manifest.generated.js +1458 -0
- package/dist/tools/lookup.d.ts +29 -0
- package/dist/tools/lookup.js +44 -0
- package/dist/tools/nyne.d.ts +11 -11
- package/dist/tools/nyne.js +23 -23
- package/dist/tools/people.d.ts +2 -2
- package/dist/tools/people.js +5 -5
- package/package.json +2 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
|
+
import { type RouteManifestEntry } from "./lookup-manifest.generated.js";
|
|
4
|
+
/**
|
|
5
|
+
* The lookup tools (#1445). One MCP tool per manifest entry, named
|
|
6
|
+
* `oneshot_<name>`; the manifest is generated from the API's lookup registry
|
|
7
|
+
* (`bun scripts/generate-lookup-tools.ts`), so a new lookup tool needs no edit here.
|
|
8
|
+
*
|
|
9
|
+
* The declared routes (#1580) are the second half: every declared route that
|
|
10
|
+
* states an agent tool and has no hand-written MCP tool is in `ROUTE_MANIFEST`
|
|
11
|
+
* and is built here the same way, through the SDK's generic `route()` call. A
|
|
12
|
+
* hand-written tool stays where it goes through a typed SDK method; the
|
|
13
|
+
* declaration names it (`agentTool.mcp`).
|
|
14
|
+
*/
|
|
15
|
+
export declare const lookupToolDefinitions: Tool[];
|
|
16
|
+
type Handler = (agent: OneShot, args: Record<string, unknown>) => Promise<unknown>;
|
|
17
|
+
export declare const lookupHandlers: Record<string, Handler>;
|
|
18
|
+
export declare const routeToolDefinitions: Tool[];
|
|
19
|
+
/**
|
|
20
|
+
* Splits a tool's arguments for the SDK's `route()`: the `{param}` inputs of the path go to `params`, and the rest
|
|
21
|
+
* to the query (a GET or DELETE) or the body (any other method). An object field is passed through unchanged.
|
|
22
|
+
*/
|
|
23
|
+
export declare function routeRequest(entry: Pick<RouteManifestEntry, "name" | "method" | "path">, args: Record<string, unknown>): {
|
|
24
|
+
params: Record<string, string | number>;
|
|
25
|
+
query?: Record<string, unknown>;
|
|
26
|
+
body?: Record<string, unknown>;
|
|
27
|
+
};
|
|
28
|
+
export declare const routeHandlers: Record<string, Handler>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LOOKUP_MANIFEST, ROUTE_MANIFEST } from "./lookup-manifest.generated.js";
|
|
2
|
+
/**
|
|
3
|
+
* The lookup tools (#1445). One MCP tool per manifest entry, named
|
|
4
|
+
* `oneshot_<name>`; the manifest is generated from the API's lookup registry
|
|
5
|
+
* (`bun scripts/generate-lookup-tools.ts`), so a new lookup tool needs no edit here.
|
|
6
|
+
*
|
|
7
|
+
* The declared routes (#1580) are the second half: every declared route that
|
|
8
|
+
* states an agent tool and has no hand-written MCP tool is in `ROUTE_MANIFEST`
|
|
9
|
+
* and is built here the same way, through the SDK's generic `route()` call. A
|
|
10
|
+
* hand-written tool stays where it goes through a typed SDK method; the
|
|
11
|
+
* declaration names it (`agentTool.mcp`).
|
|
12
|
+
*/
|
|
13
|
+
export const lookupToolDefinitions = LOOKUP_MANIFEST.map((entry) => ({
|
|
14
|
+
name: `oneshot_${entry.name}`,
|
|
15
|
+
description: entry.description,
|
|
16
|
+
inputSchema: entry.inputSchema,
|
|
17
|
+
}));
|
|
18
|
+
export const lookupHandlers = Object.fromEntries(LOOKUP_MANIFEST.map((entry) => [
|
|
19
|
+
`oneshot_${entry.name}`,
|
|
20
|
+
(agent, args) => agent.tool(entry.path, args),
|
|
21
|
+
]));
|
|
22
|
+
export const routeToolDefinitions = ROUTE_MANIFEST.map((entry) => ({
|
|
23
|
+
name: `oneshot_${entry.name}`,
|
|
24
|
+
description: entry.description,
|
|
25
|
+
inputSchema: entry.inputSchema,
|
|
26
|
+
}));
|
|
27
|
+
/**
|
|
28
|
+
* Splits a tool's arguments for the SDK's `route()`: the `{param}` inputs of the path go to `params`, and the rest
|
|
29
|
+
* to the query (a GET or DELETE) or the body (any other method). An object field is passed through unchanged.
|
|
30
|
+
*/
|
|
31
|
+
export function routeRequest(entry, args) {
|
|
32
|
+
const rest = { ...args };
|
|
33
|
+
const params = {};
|
|
34
|
+
for (const [, param] of entry.path.matchAll(/\{([a-z0-9_]+)\}/g)) {
|
|
35
|
+
const value = rest[param];
|
|
36
|
+
delete rest[param];
|
|
37
|
+
if ((typeof value !== "string" && typeof value !== "number") || String(value) === "")
|
|
38
|
+
throw new Error(`oneshot_${entry.name}: ${param} is required`);
|
|
39
|
+
params[param] = value;
|
|
40
|
+
}
|
|
41
|
+
return entry.method === "GET" || entry.method === "DELETE" ? { params, query: rest } : { params, body: rest };
|
|
42
|
+
}
|
|
43
|
+
const routeHandler = (entry) => (agent, args) => agent.route(entry.method, entry.path, { ...routeRequest(entry, args), paid: entry.paid });
|
|
44
|
+
export const routeHandlers = Object.fromEntries(ROUTE_MANIFEST.map((entry) => [`oneshot_${entry.name}`, routeHandler(entry)]));
|
package/dist/tools/nyne.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
2
|
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
3
|
+
export declare const personDossierTool: Tool;
|
|
4
|
+
export declare const personSocialAccountsTool: Tool;
|
|
5
|
+
export declare const personArticlesTool: Tool;
|
|
6
|
+
export declare const personPostsTool: Tool;
|
|
7
7
|
export declare const personInterestsTool: Tool;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const personFollowersTool: Tool;
|
|
9
9
|
/** Deep person research fans out across several providers; the SDK's 120s default was too short. */
|
|
10
|
-
export declare const
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function
|
|
10
|
+
export declare const PERSON_DOSSIER_TIMEOUT_SEC = 300;
|
|
11
|
+
export declare function handlePersonDossier(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").PersonDossierResult>;
|
|
12
|
+
export declare function handlePersonSocialAccounts(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").PersonSocialAccountsResult>;
|
|
13
|
+
export declare function handlePersonArticles(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").PersonArticlesResult>;
|
|
14
|
+
export declare function handlePersonPosts(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").PersonPostsResult>;
|
|
15
15
|
export declare function handlePersonInterests(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").PersonInterestsResult>;
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function handlePersonFollowers(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").PersonFollowersResult>;
|
package/dist/tools/nyne.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const
|
|
2
|
-
name: "
|
|
3
|
-
description: "
|
|
1
|
+
export const personDossierTool = {
|
|
2
|
+
name: "oneshot_person_dossier",
|
|
3
|
+
description: "Get a person’s profile, known social accounts, articles, posts and written summary. Takes 2-5 minutes. Paid tool.",
|
|
4
4
|
inputSchema: {
|
|
5
5
|
type: "object",
|
|
6
6
|
properties: {
|
|
@@ -11,8 +11,8 @@ export const deepResearchPersonTool = {
|
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
13
|
};
|
|
14
|
-
export const
|
|
15
|
-
name: "
|
|
14
|
+
export const personSocialAccountsTool = {
|
|
15
|
+
name: "oneshot_person_social_accounts",
|
|
16
16
|
description: "Discover all social media profiles for a person across platforms (LinkedIn, Twitter, GitHub, YouTube, etc). Paid tool.",
|
|
17
17
|
inputSchema: {
|
|
18
18
|
type: "object",
|
|
@@ -22,8 +22,8 @@ export const socialProfilesTool = {
|
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
|
-
export const
|
|
26
|
-
name: "
|
|
25
|
+
export const personArticlesTool = {
|
|
26
|
+
name: "oneshot_person_articles",
|
|
27
27
|
description: "Find articles, publications, and interviews about a person. Requires name and company. Paid tool.",
|
|
28
28
|
inputSchema: {
|
|
29
29
|
type: "object",
|
|
@@ -36,8 +36,8 @@ export const articleSearchTool = {
|
|
|
36
36
|
required: ["name", "company"],
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
|
-
export const
|
|
40
|
-
name: "
|
|
39
|
+
export const personPostsTool = {
|
|
40
|
+
name: "oneshot_person_posts",
|
|
41
41
|
description: "Get a person's recent social media posts with likes, replies, and shares. Paid tool.",
|
|
42
42
|
inputSchema: {
|
|
43
43
|
type: "object",
|
|
@@ -59,8 +59,8 @@ export const personInterestsTool = {
|
|
|
59
59
|
},
|
|
60
60
|
},
|
|
61
61
|
};
|
|
62
|
-
export const
|
|
63
|
-
name: "
|
|
62
|
+
export const personFollowersTool = {
|
|
63
|
+
name: "oneshot_person_followers",
|
|
64
64
|
description: "See who someone follows, who follows them, and who they reply to. Paid tool.",
|
|
65
65
|
inputSchema: {
|
|
66
66
|
type: "object",
|
|
@@ -73,32 +73,32 @@ export const personInteractionsTool = {
|
|
|
73
73
|
},
|
|
74
74
|
};
|
|
75
75
|
/** Deep person research fans out across several providers; the SDK's 120s default was too short. */
|
|
76
|
-
export const
|
|
77
|
-
export async function
|
|
78
|
-
return agent.
|
|
76
|
+
export const PERSON_DOSSIER_TIMEOUT_SEC = 300;
|
|
77
|
+
export async function handlePersonDossier(agent, args) {
|
|
78
|
+
return agent.personDossier({
|
|
79
79
|
email: args.email,
|
|
80
80
|
social_media_url: args.social_media_url,
|
|
81
81
|
name: args.name,
|
|
82
82
|
company: args.company,
|
|
83
|
-
timeout:
|
|
83
|
+
timeout: PERSON_DOSSIER_TIMEOUT_SEC,
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
export async function
|
|
87
|
-
return agent.
|
|
86
|
+
export async function handlePersonSocialAccounts(agent, args) {
|
|
87
|
+
return agent.personSocialAccounts({
|
|
88
88
|
email: args.email,
|
|
89
89
|
social_media_url: args.social_media_url,
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
export async function
|
|
93
|
-
return agent.
|
|
92
|
+
export async function handlePersonArticles(agent, args) {
|
|
93
|
+
return agent.personArticles({
|
|
94
94
|
name: args.name,
|
|
95
95
|
company: args.company,
|
|
96
96
|
sort: args.sort,
|
|
97
97
|
limit: args.limit,
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
export async function
|
|
101
|
-
return agent.
|
|
100
|
+
export async function handlePersonPosts(agent, args) {
|
|
101
|
+
return agent.personPosts({
|
|
102
102
|
social_media_url: args.social_media_url,
|
|
103
103
|
});
|
|
104
104
|
}
|
|
@@ -109,8 +109,8 @@ export async function handlePersonInterests(agent, args) {
|
|
|
109
109
|
social_media_url: args.social_media_url,
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
export async function
|
|
113
|
-
return agent.
|
|
112
|
+
export async function handlePersonFollowers(agent, args) {
|
|
113
|
+
return agent.personFollowers({
|
|
114
114
|
social_media_url: args.social_media_url,
|
|
115
115
|
type: args.type,
|
|
116
116
|
max_results: args.max_results,
|
package/dist/tools/people.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
2
|
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
|
-
export declare const
|
|
4
|
-
export declare function
|
|
3
|
+
export declare const personFindTool: Tool;
|
|
4
|
+
export declare function handlePersonFind(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").PersonFindResult>;
|
package/dist/tools/people.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const
|
|
2
|
-
name: "
|
|
1
|
+
export const personFindTool = {
|
|
2
|
+
name: "oneshot_person_find",
|
|
3
3
|
description: "Search for people by job title, company, location, skills, etc. Returns professional profiles. Paid tool — quote provided before payment.",
|
|
4
4
|
inputSchema: {
|
|
5
5
|
type: "object",
|
|
@@ -22,7 +22,7 @@ export const peopleSearchTool = {
|
|
|
22
22
|
company_domains: {
|
|
23
23
|
type: "array",
|
|
24
24
|
items: { type: "string" },
|
|
25
|
-
description: "Company domains to filter by (e.g., ['stripe.com', 'nike.com']). Preferred over company names
|
|
25
|
+
description: "Company domains to filter by (e.g., ['stripe.com', 'nike.com']). Preferred over company names; matches more reliably.",
|
|
26
26
|
},
|
|
27
27
|
location: {
|
|
28
28
|
type: "array",
|
|
@@ -55,8 +55,8 @@ export const peopleSearchTool = {
|
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
57
|
};
|
|
58
|
-
export async function
|
|
59
|
-
return agent.
|
|
58
|
+
export async function handlePersonFind(agent, args) {
|
|
59
|
+
return agent.personFind({
|
|
60
60
|
job_titles: args.job_titles,
|
|
61
61
|
keywords: args.keywords,
|
|
62
62
|
companies: args.companies,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneshot-agent/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "MCP server for OneShot - 81 tools for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@coinbase/cdp-sdk": "1.45.0",
|
|
28
28
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
29
|
-
"@oneshot-agent/sdk": "^0.
|
|
29
|
+
"@oneshot-agent/sdk": "^0.52.0",
|
|
30
30
|
"zod": "3.25.76"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|