@jinshuju/mcp 0.2.0 → 0.3.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/dist/result.d.ts CHANGED
@@ -5,4 +5,6 @@
5
5
  import type { CallToolResult } from '@modelcontextprotocol/server';
6
6
  import type { ApiResponse } from './api.js';
7
7
  import type { ToolSpec } from './types.js';
8
+ /** The 403 hint; it names the scope itself, so analytics.ts leaves it out when looking for a scope failure in the API's own words. */
9
+ export declare const FORBIDDEN_HINT = "No permission, a quota is used up, or the OAuth scope is insufficient.";
8
10
  export declare function toToolResult(tool: ToolSpec, res: ApiResponse, maxResultChars: number): CallToolResult;
package/dist/result.js CHANGED
@@ -21,6 +21,8 @@ function errorLines(res) {
21
21
  lines.push(res.text);
22
22
  return lines;
23
23
  }
24
+ /** The 403 hint; it names the scope itself, so analytics.ts leaves it out when looking for a scope failure in the API's own words. */
25
+ export const FORBIDDEN_HINT = 'No permission, a quota is used up, or the OAuth scope is insufficient.';
24
26
  function hint(status, res) {
25
27
  switch (status) {
26
28
  case 400:
@@ -30,7 +32,7 @@ function hint(status, res) {
30
32
  case 402:
31
33
  return 'The current plan does not include API v1.';
32
34
  case 403:
33
- return 'No permission, a quota is used up, or the OAuth scope is insufficient.';
35
+ return FORBIDDEN_HINT;
34
36
  case 404:
35
37
  return 'The resource does not exist or this credential cannot access it (check the token / serial number).';
36
38
  case 415:
package/dist/types.d.ts CHANGED
@@ -9,6 +9,8 @@ export interface ParamSpec {
9
9
  required: boolean;
10
10
  /** A query array is serialized as name[]=a&name[]=b (the server reads it as an array) */
11
11
  array?: boolean;
12
+ /** Declared with `content: application/json`: sent as one query value holding JSON text (a string is passed through as is) */
13
+ json?: boolean;
12
14
  }
13
15
  export interface BodySpec {
14
16
  contentType: 'application/json' | 'multipart/form-data';
package/dist/version.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export declare const VERSION = "0.2.0";
1
+ export declare const VERSION = "0.3.0";
2
2
  export declare const SERVER_NAME = "jinshuju";
3
3
  export declare const SERVER_TITLE = "Jinshuju MCP Server";
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // release-please keeps this in sync through extra-files; the runtime does not read package.json because Workers has no file system.
2
- export const VERSION = '0.2.0'; // x-release-please-version
2
+ export const VERSION = '0.3.0'; // x-release-please-version
3
3
  export const SERVER_NAME = 'jinshuju';
4
4
  export const SERVER_TITLE = 'Jinshuju MCP Server';
5
5
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jinshuju/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "MCP server for the Jinshuju (金数据) Open API v1, generated from openapi.yaml",
5
5
  "homepage": "https://github.com/jinshuju/mcp#readme",
6
6
  "bugs": {