mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 09:45:36 +00:00
fix(mcp): analyze_bandar lists the tiers top accepts
The schema said uint8 0-255; only 1, 3, 5 and 10 are valid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V3syn2fN2LNo5pvTSqc6eh
This commit is contained in:
parent
d82f7c6be9
commit
6f211a398f
3 changed files with 14 additions and 8 deletions
|
|
@ -1,6 +1,7 @@
|
|||
//! Tool inputs. String enums are validated by idx-core's `FromStr`, so the
|
||||
//! accepted values and error messages match the CLI; the schemas list them.
|
||||
|
||||
use idx_core::analysis::bandar::TIERS;
|
||||
use idx_core::api::types::{Interval, Period};
|
||||
use idx_core::broker::types::{BrokerBoard, BrokerInvestor};
|
||||
use idx_core::flow::types::FlowSource;
|
||||
|
|
@ -155,6 +156,7 @@ pub struct BandarParams {
|
|||
pub scope: BrokerScope,
|
||||
/// Tier behind the headline signal: 1, 3, 5 or 10 brokers per side (default 5).
|
||||
#[serde(default)]
|
||||
#[schemars(schema_with = "top_schema")]
|
||||
pub top: Option<u8>,
|
||||
}
|
||||
|
||||
|
|
@ -255,3 +257,7 @@ fn board_schema(_: &mut SchemaGenerator) -> Schema {
|
|||
fn flow_source_schema(_: &mut SchemaGenerator) -> Schema {
|
||||
string_enum(FlowSource::ALL.map(FlowSource::as_str).to_vec())
|
||||
}
|
||||
|
||||
fn top_schema(_: &mut SchemaGenerator) -> Schema {
|
||||
json_schema!({ "type": "integer", "enum": TIERS })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue