clean(mcp): extract constants, use CARGO_PKG_VERSION, fix unreachable
- extract DEFAULT_DATABASE_URL, DEFAULT_SEARCH_LIMIT, SERVER_NAME
- use env!("CARGO_PKG_VERSION") instead of hardcoded "0.1.0"
- content_type_to_str returns &'static str instead of allocating String
- cfg guard on unreachable pattern in wire_repositories
This commit is contained in:
@@ -16,6 +16,8 @@ use uuid::Uuid;
|
||||
|
||||
use crate::tools::{channels, library, schedule};
|
||||
|
||||
const SERVER_NAME: &str = "k-tv-mcp";
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct KTvMcpServer {
|
||||
pub channel_cmd_deps: Arc<ChannelCommandDeps>,
|
||||
@@ -191,8 +193,8 @@ impl ServerHandler for KTvMcpServer {
|
||||
protocol_version: ProtocolVersion::V_2024_11_05,
|
||||
capabilities: ServerCapabilities::builder().enable_tools().build(),
|
||||
server_info: Implementation {
|
||||
name: "k-tv-mcp".into(),
|
||||
version: "0.1.0".into(),
|
||||
name: SERVER_NAME.into(),
|
||||
version: env!("CARGO_PKG_VERSION").into(),
|
||||
},
|
||||
instructions: Some(
|
||||
"K-TV MCP server. Create channels, define programming blocks, generate schedules. \
|
||||
|
||||
Reference in New Issue
Block a user