@dalmia/calibrate-mcp 0.0.37 → 0.0.39

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.
Files changed (48) hide show
  1. package/bin/mcp-server.js +339 -149
  2. package/bin/mcp-server.js.map +14 -8
  3. package/esm/funcs/annotationTasksCreateLabellingJobs.d.ts +16 -0
  4. package/esm/funcs/annotationTasksCreateLabellingJobs.d.ts.map +1 -0
  5. package/esm/funcs/annotationTasksCreateLabellingJobs.js +92 -0
  6. package/esm/funcs/annotationTasksCreateLabellingJobs.js.map +1 -0
  7. package/esm/landing-page.js +1 -1
  8. package/esm/lib/config.d.ts +2 -2
  9. package/esm/lib/config.js +2 -2
  10. package/esm/mcp-server/mcp-server.js +1 -1
  11. package/esm/mcp-server/server.d.ts.map +1 -1
  12. package/esm/mcp-server/server.js +3 -1
  13. package/esm/mcp-server/server.js.map +1 -1
  14. package/esm/mcp-server/tools/annotationTasksCreateLabellingJobs.d.ts +7 -0
  15. package/esm/mcp-server/tools/annotationTasksCreateLabellingJobs.d.ts.map +1 -0
  16. package/esm/mcp-server/tools/annotationTasksCreateLabellingJobs.js +34 -0
  17. package/esm/mcp-server/tools/annotationTasksCreateLabellingJobs.js.map +1 -0
  18. package/esm/models/createjobsannotationtaskstaskuuidjobspostop.d.ts +13 -0
  19. package/esm/models/createjobsannotationtaskstaskuuidjobspostop.d.ts.map +1 -0
  20. package/esm/models/createjobsannotationtaskstaskuuidjobspostop.js +17 -0
  21. package/esm/models/createjobsannotationtaskstaskuuidjobspostop.js.map +1 -0
  22. package/esm/models/createjobsrequest.d.ts +30 -0
  23. package/esm/models/createjobsrequest.d.ts.map +1 -0
  24. package/esm/models/createjobsrequest.js +28 -0
  25. package/esm/models/createjobsrequest.js.map +1 -0
  26. package/esm/models/createjobsresponse.d.ts +8 -0
  27. package/esm/models/createjobsresponse.d.ts.map +1 -0
  28. package/esm/models/createjobsresponse.js +11 -0
  29. package/esm/models/createjobsresponse.js.map +1 -0
  30. package/esm/models/labellingjobcreated.d.ts +13 -0
  31. package/esm/models/labellingjobcreated.d.ts.map +1 -0
  32. package/esm/models/labellingjobcreated.js +16 -0
  33. package/esm/models/labellingjobcreated.js.map +1 -0
  34. package/esm/tool-names.d.ts.map +1 -1
  35. package/esm/tool-names.js +4 -0
  36. package/esm/tool-names.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/funcs/annotationTasksCreateLabellingJobs.ts +158 -0
  39. package/src/landing-page.ts +1 -1
  40. package/src/lib/config.ts +2 -2
  41. package/src/mcp-server/mcp-server.ts +1 -1
  42. package/src/mcp-server/server.ts +3 -1
  43. package/src/mcp-server/tools/annotationTasksCreateLabellingJobs.ts +45 -0
  44. package/src/models/createjobsannotationtaskstaskuuidjobspostop.ts +40 -0
  45. package/src/models/createjobsrequest.ts +62 -0
  46. package/src/models/createjobsresponse.ts +22 -0
  47. package/src/models/labellingjobcreated.ts +40 -0
  48. package/src/tool-names.ts +4 -0
@@ -0,0 +1,158 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CalibrateMcpCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import {
13
+ CreateJobsAnnotationTasksTaskUuidJobsPostRequest,
14
+ CreateJobsAnnotationTasksTaskUuidJobsPostRequest$zodSchema,
15
+ } from "../models/createjobsannotationtaskstaskuuidjobspostop.js";
16
+ import { APIError } from "../models/errors/apierror.js";
17
+ import {
18
+ ConnectionError,
19
+ InvalidRequestError,
20
+ RequestAbortedError,
21
+ RequestTimeoutError,
22
+ UnexpectedClientError,
23
+ } from "../models/errors/httpclienterrors.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Create labelling jobs
30
+ *
31
+ * @remarks
32
+ * Assign items to annotators, creating one labelling job per annotator
33
+ */
34
+ export function annotationTasksCreateLabellingJobs(
35
+ client$: CalibrateMcpCore,
36
+ request: CreateJobsAnnotationTasksTaskUuidJobsPostRequest,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ Response,
41
+ | APIError
42
+ | SDKValidationError
43
+ | UnexpectedClientError
44
+ | InvalidRequestError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | ConnectionError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client$,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client$: CalibrateMcpCore,
59
+ request: CreateJobsAnnotationTasksTaskUuidJobsPostRequest,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ Response,
65
+ | APIError
66
+ | SDKValidationError
67
+ | UnexpectedClientError
68
+ | InvalidRequestError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | ConnectionError
72
+ >,
73
+ APICall,
74
+ ]
75
+ > {
76
+ const parsed$ = safeParse(
77
+ request,
78
+ (value$) =>
79
+ CreateJobsAnnotationTasksTaskUuidJobsPostRequest$zodSchema.parse(value$),
80
+ "Input validation failed",
81
+ );
82
+ if (!parsed$.ok) {
83
+ return [parsed$, { status: "invalid" }];
84
+ }
85
+ const payload$ = parsed$.value;
86
+ const body$ = encodeJSON("body", payload$.body, { explode: true });
87
+
88
+ const pathParams$ = {
89
+ task_uuid: encodeSimple("task_uuid", payload$.task_uuid, {
90
+ explode: false,
91
+ charEncoding: "percent",
92
+ }),
93
+ };
94
+ const path$ = pathToFunc("/annotation-tasks/{task_uuid}/jobs")(
95
+ pathParams$,
96
+ );
97
+
98
+ const headers$ = new Headers(compactMap({
99
+ "Content-Type": "application/json",
100
+ Accept: "application/json",
101
+ "X-API-Key": encodeSimple("X-API-Key", payload$.xAPIKey, {
102
+ explode: false,
103
+ charEncoding: "none",
104
+ }),
105
+ }));
106
+ const securityInput = await extractSecurity(client$._options.security);
107
+ const requestSecurity = resolveGlobalSecurity(securityInput);
108
+
109
+ const context = {
110
+ options: client$._options,
111
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
112
+ operationID: "create_jobs_annotation_tasks__task_uuid__jobs_post",
113
+ oAuth2Scopes: null,
114
+ resolvedSecurity: requestSecurity,
115
+ securitySource: client$._options.security,
116
+ retryConfig: options?.retries
117
+ || client$._options.retryConfig
118
+ || { strategy: "none" },
119
+ retryCodes: options?.retryCodes || [
120
+ "429",
121
+ "500",
122
+ "502",
123
+ "503",
124
+ "504",
125
+ ],
126
+ };
127
+
128
+ const requestRes = client$._createRequest(context, {
129
+ security: requestSecurity,
130
+ method: "POST",
131
+ baseURL: options?.serverURL,
132
+ path: path$,
133
+ headers: headers$,
134
+ body: body$,
135
+ userAgent: client$._options.userAgent,
136
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
137
+ || -1,
138
+ }, options);
139
+ if (!requestRes.ok) {
140
+ return [requestRes, { status: "invalid" }];
141
+ }
142
+ const req$ = requestRes.value;
143
+
144
+ const doResult = await client$._do(req$, {
145
+ context,
146
+ errorCodes: [],
147
+ retryConfig: context.retryConfig,
148
+ retryCodes: context.retryCodes,
149
+ });
150
+ if (!doResult.ok) {
151
+ return [doResult, { status: "request-error", request: req$ }];
152
+ }
153
+ return [doResult, {
154
+ status: "complete",
155
+ "request": req$,
156
+ response: doResult.value,
157
+ }];
158
+ }
@@ -930,7 +930,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
930
930
  <h1>Instructions</h1>
931
931
  <p>One-click installation for Claude Desktop users</p>
932
932
  <div class="instruction-item">
933
- <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.37/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
933
+ <a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.39/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
934
934
  📥 Download MCP Bundle
935
935
  </a>
936
936
  </div>
package/src/lib/config.ts CHANGED
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "0.1.0",
68
- sdkVersion: "0.0.37",
68
+ sdkVersion: "0.0.39",
69
69
  genVersion: "2.915.1",
70
70
  userAgent:
71
- "speakeasy-sdk/mcp-typescript 0.0.37 2.915.1 0.1.0 @dalmia/calibrate-mcp",
71
+ "speakeasy-sdk/mcp-typescript 0.0.39 2.915.1 0.1.0 @dalmia/calibrate-mcp",
72
72
  } as const;
@@ -21,7 +21,7 @@ const routes = buildRouteMap({
21
21
  export const app = buildApplication(routes, {
22
22
  name: "mcp",
23
23
  versionInfo: {
24
- currentVersion: "0.0.37",
24
+ currentVersion: "0.0.39",
25
25
  },
26
26
  });
27
27
 
@@ -36,6 +36,7 @@ import { tool$agentTestsRunBatch } from "./tools/agentTestsRunBatch.js";
36
36
  import { tool$annotationTasksAddItems } from "./tools/annotationTasksAddItems.js";
37
37
  import { tool$annotationTasksCreate } from "./tools/annotationTasksCreate.js";
38
38
  import { tool$annotationTasksCreateEvaluatorRun } from "./tools/annotationTasksCreateEvaluatorRun.js";
39
+ import { tool$annotationTasksCreateLabellingJobs } from "./tools/annotationTasksCreateLabellingJobs.js";
39
40
  import { tool$annotationTasksGet } from "./tools/annotationTasksGet.js";
40
41
  import { tool$annotationTasksGetAgreement } from "./tools/annotationTasksGetAgreement.js";
41
42
  import { tool$annotationTasksGetEvaluatorRun } from "./tools/annotationTasksGetEvaluatorRun.js";
@@ -70,7 +71,7 @@ export function createMCPServer(deps: {
70
71
  }) {
71
72
  const server = new McpServer({
72
73
  name: "CalibrateMcp",
73
- version: "0.0.37",
74
+ version: "0.0.39",
74
75
  });
75
76
 
76
77
  const getClient = deps.getSDK || (() =>
@@ -146,6 +147,7 @@ export function createMCPServer(deps: {
146
147
  tool(tool$annotationTasksSetEvaluators);
147
148
  tool(tool$annotationTasksAddItems);
148
149
  tool(tool$annotationTasksUpdateItems);
150
+ tool(tool$annotationTasksCreateLabellingJobs);
149
151
  tool(tool$annotationTasksCreateEvaluatorRun);
150
152
  tool(tool$annotationTasksGetEvaluatorRun);
151
153
  tool(tool$annotationTasksGetAgreement);
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { annotationTasksCreateLabellingJobs } from "../../funcs/annotationTasksCreateLabellingJobs.js";
6
+ import { CreateJobsAnnotationTasksTaskUuidJobsPostRequest$zodSchema } from "../../models/createjobsannotationtaskstaskuuidjobspostop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: CreateJobsAnnotationTasksTaskUuidJobsPostRequest$zodSchema,
11
+ };
12
+
13
+ export const tool$annotationTasksCreateLabellingJobs: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "create-labelling-jobs",
17
+ description:
18
+ `Assign items to annotators, creating one labelling job per annotator. Each job comes back with a public_token for the annotator's labelling link.
19
+ `,
20
+ scopes: ["write"],
21
+ annotations: {
22
+ "title": "Create labelling jobs",
23
+ "destructiveHint": false,
24
+ "idempotentHint": false,
25
+ "openWorldHint": true,
26
+ "readOnlyHint": false,
27
+ },
28
+ args,
29
+ tool: async (client, args, ctx) => {
30
+ const [result] = await annotationTasksCreateLabellingJobs(
31
+ client,
32
+ args.request,
33
+ { fetchOptions: { signal: ctx.signal } },
34
+ ).$inspect();
35
+
36
+ if (!result.ok) {
37
+ return {
38
+ content: [{ type: "text", text: result.error.message }],
39
+ isError: true,
40
+ };
41
+ }
42
+
43
+ return formatResult(result.value);
44
+ },
45
+ };
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import {
7
+ CreateJobsRequest,
8
+ CreateJobsRequest$zodSchema,
9
+ } from "./createjobsrequest.js";
10
+ import {
11
+ CreateJobsResponse,
12
+ CreateJobsResponse$zodSchema,
13
+ } from "./createjobsresponse.js";
14
+ import {
15
+ HTTPValidationError,
16
+ HTTPValidationError$zodSchema,
17
+ } from "./httpvalidationerror.js";
18
+
19
+ export type CreateJobsAnnotationTasksTaskUuidJobsPostRequest = {
20
+ task_uuid: string;
21
+ xAPIKey?: string | null | undefined;
22
+ body: CreateJobsRequest;
23
+ };
24
+
25
+ export const CreateJobsAnnotationTasksTaskUuidJobsPostRequest$zodSchema:
26
+ z.ZodType<CreateJobsAnnotationTasksTaskUuidJobsPostRequest> = z.object({
27
+ body: CreateJobsRequest$zodSchema,
28
+ task_uuid: z.string().describe("Annotation task to act on"),
29
+ xAPIKey: z.string().nullable().optional(),
30
+ });
31
+
32
+ export type CreateJobsAnnotationTasksTaskUuidJobsPostResponse =
33
+ | CreateJobsResponse
34
+ | HTTPValidationError;
35
+
36
+ export const CreateJobsAnnotationTasksTaskUuidJobsPostResponse$zodSchema:
37
+ z.ZodType<CreateJobsAnnotationTasksTaskUuidJobsPostResponse> = z.union([
38
+ CreateJobsResponse$zodSchema,
39
+ HTTPValidationError$zodSchema,
40
+ ]);
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../types/enums.js";
7
+
8
+ /**
9
+ * How the labelling form treats the reasoning box on each judgement. `optional` shows it, `required` shows it and asks the annotator to fill it in, `hidden` leaves it out
10
+ */
11
+ export const ReasoningMode = {
12
+ Optional: "optional",
13
+ Required: "required",
14
+ Hidden: "hidden",
15
+ } as const;
16
+ /**
17
+ * How the labelling form treats the reasoning box on each judgement. `optional` shows it, `required` shows it and asks the annotator to fill it in, `hidden` leaves it out
18
+ */
19
+ export type ReasoningMode = ClosedEnum<typeof ReasoningMode>;
20
+
21
+ export const ReasoningMode$zodSchema = z.enum([
22
+ "optional",
23
+ "required",
24
+ "hidden",
25
+ ]).describe(
26
+ "How the labelling form treats the reasoning box on each judgement. `optional` shows it, `required` shows it and asks the annotator to fill it in, `hidden` leaves it out",
27
+ );
28
+
29
+ export type CreateJobsRequest = {
30
+ annotator_ids: Array<string>;
31
+ item_ids?: Array<string> | undefined;
32
+ select_all?: boolean | undefined;
33
+ q?: string | null | undefined;
34
+ evaluator_ids?: Array<string> | null | undefined;
35
+ comments_enabled?: boolean | undefined;
36
+ reasoning_mode?: ReasoningMode | undefined;
37
+ };
38
+
39
+ export const CreateJobsRequest$zodSchema: z.ZodType<CreateJobsRequest> = z
40
+ .object({
41
+ annotator_ids: z.array(z.string()).describe(
42
+ "Annotator IDs to assign, creating one labelling job for each annotator. Must be in your workspace",
43
+ ),
44
+ comments_enabled: z.boolean().default(true).describe(
45
+ "When `true`, the labelling form lets the annotator leave a comment on each item",
46
+ ),
47
+ evaluator_ids: z.array(z.string()).nullable().optional().describe(
48
+ "Subset of the task's linked evaluators to show in these jobs. Must be a subset of the current links, an empty list gives a 400. Applies to every annotator's job. Omit (`None`) to snapshot every linked evaluator",
49
+ ),
50
+ item_ids: z.array(z.string()).optional().describe(
51
+ "Item IDs to assign. **Required when `select_all=false`**. Ignored when `select_all=true`",
52
+ ),
53
+ q: z.string().nullable().optional().describe(
54
+ "Case-insensitive substring filter on `payload.name`. Applies only when `select_all=true`",
55
+ ),
56
+ reasoning_mode: ReasoningMode$zodSchema.default("optional").describe(
57
+ "How the labelling form treats the reasoning box on each judgement. `optional` shows it, `required` shows it and asks the annotator to fill it in, `hidden` leaves it out",
58
+ ),
59
+ select_all: z.boolean().default(false).describe(
60
+ "When `true`, assign every item in the task and ignore `item_ids`. Set `q` to assign only items whose name matches it",
61
+ ),
62
+ });
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import {
7
+ LabellingJobCreated,
8
+ LabellingJobCreated$zodSchema,
9
+ } from "./labellingjobcreated.js";
10
+
11
+ export type CreateJobsResponse = {
12
+ jobs: Array<LabellingJobCreated>;
13
+ count: number;
14
+ };
15
+
16
+ export const CreateJobsResponse$zodSchema: z.ZodType<CreateJobsResponse> = z
17
+ .object({
18
+ count: z.int().describe("How many jobs were created"),
19
+ jobs: z.array(LabellingJobCreated$zodSchema).describe(
20
+ "The jobs created, one for each annotator",
21
+ ),
22
+ });
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type LabellingJobCreated = {
8
+ uuid: string;
9
+ public_token: string;
10
+ annotator_id: string;
11
+ annotator_name: string;
12
+ item_ids: Array<string>;
13
+ item_count: number;
14
+ evaluator_ids: Array<string>;
15
+ status?: "pending" | undefined;
16
+ };
17
+
18
+ export const LabellingJobCreated$zodSchema: z.ZodType<LabellingJobCreated> = z
19
+ .object({
20
+ annotator_id: z.string().describe(
21
+ "ID of the annotator the job is assigned to",
22
+ ),
23
+ annotator_name: z.string().describe(
24
+ "Name of the annotator the job is assigned to",
25
+ ),
26
+ evaluator_ids: z.array(z.string()).describe(
27
+ "IDs of the evaluators the annotator scores each item on, in the order they are shown",
28
+ ),
29
+ item_count: z.int().describe("How many items the annotator has to label"),
30
+ item_ids: z.array(z.string()).describe(
31
+ "IDs of the items assigned to the annotator",
32
+ ),
33
+ public_token: z.string().describe(
34
+ "Token that opens the annotator's labelling page without signing in",
35
+ ),
36
+ status: z.literal("pending").default("pending").optional().describe(
37
+ "Status of the job right after you create it",
38
+ ),
39
+ uuid: z.string().describe("ID of the labelling job"),
40
+ });
package/src/tool-names.ts CHANGED
@@ -124,6 +124,10 @@ export const toolNames: Array<{ name: string; description: string }>= [
124
124
  "name": "update-annotation-items",
125
125
  "description": "Bulk-update item payloads in an annotation task.\n"
126
126
  },
127
+ {
128
+ "name": "create-labelling-jobs",
129
+ "description": "Assign items to annotators, creating one labelling job per annotator. Each job comes back with a public_token for the annotator's labelling link.\n"
130
+ },
127
131
  {
128
132
  "name": "run-annotation-evaluators",
129
133
  "description": "Run one or more of a task's evaluators over its items as a background job. Returns a job_uuid to poll with get-annotation-evaluator-run.\n"