krx-cli 1.7.0 → 1.7.1
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/SKILL.md +1 -1
- package/dist/cli.js +5 -4
- package/dist/cli.js.map +2 -2
- package/dist/mcp.js +5 -4
- package/dist/mcp.js.map +2 -2
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -31157,7 +31157,7 @@ function applyPipeline(data, options) {
|
|
|
31157
31157
|
if (options.sort) {
|
|
31158
31158
|
result = sortData(result, options.sort, options.direction ?? "desc");
|
|
31159
31159
|
}
|
|
31160
|
-
if (options.offset && options.offset > 0) {
|
|
31160
|
+
if (options.offset !== void 0 && options.offset > 0) {
|
|
31161
31161
|
result = result.slice(options.offset);
|
|
31162
31162
|
}
|
|
31163
31163
|
if (options.limit && options.limit > 0) {
|
|
@@ -31167,7 +31167,7 @@ function applyPipeline(data, options) {
|
|
|
31167
31167
|
}
|
|
31168
31168
|
|
|
31169
31169
|
// src/mcp/tools/result.ts
|
|
31170
|
-
var MAX_RESULT_BYTES =
|
|
31170
|
+
var MAX_RESULT_BYTES = 5e5;
|
|
31171
31171
|
function successResult(data) {
|
|
31172
31172
|
const text = JSON.stringify(data, null, 2);
|
|
31173
31173
|
if (Buffer.byteLength(text, "utf-8") <= MAX_RESULT_BYTES) {
|
|
@@ -31178,7 +31178,7 @@ function successResult(data) {
|
|
|
31178
31178
|
while (lo < hi) {
|
|
31179
31179
|
const mid = Math.ceil((lo + hi) / 2);
|
|
31180
31180
|
const candidate = JSON.stringify(data.slice(0, mid), null, 2);
|
|
31181
|
-
if (Buffer.byteLength(candidate, "utf-8") <= MAX_RESULT_BYTES -
|
|
31181
|
+
if (Buffer.byteLength(candidate, "utf-8") <= MAX_RESULT_BYTES - 2e3) {
|
|
31182
31182
|
lo = mid;
|
|
31183
31183
|
} else {
|
|
31184
31184
|
hi = mid - 1;
|
|
@@ -31222,7 +31222,8 @@ Notes:
|
|
|
31222
31222
|
- Data is T-1 (previous trading day)
|
|
31223
31223
|
- All response values are strings
|
|
31224
31224
|
- Rate limit: 10,000 calls/day
|
|
31225
|
-
- IMPORTANT:
|
|
31225
|
+
- IMPORTANT: When querying a specific stock, ALWAYS pass 'isuCd' to filter. Without it, all stocks in the market are returned.
|
|
31226
|
+
- Full market listings can exceed the result size limit. Use 'fields' to select only needed columns, or 'limit'+'offset' for pagination. If the response contains '_truncated', follow its instructions to retrieve remaining data.`;
|
|
31226
31227
|
}
|
|
31227
31228
|
function buildInputSchema(endpoints) {
|
|
31228
31229
|
const shortNames = endpoints.map((e) => getEndpointShortName(e.path));
|