pub struct IndexContext {
pub server_name: String,
pub server_version: String,
pub tool_count: usize,
pub tools: Vec<ToolSummary>,
pub categories: Option<Vec<CategoryInfo>>,
}Expand description
Context for rendering the index.ts template.
Contains server-level metadata and list of all tools.
§Examples
use mcp_execution_codegen::progressive::IndexContext;
let context = IndexContext {
server_name: "GitHub".to_string(),
server_version: "1.0.0".to_string(),
tool_count: 30,
tools: vec![],
categories: None,
};
assert_eq!(context.tool_count, 30);Fields§
§server_name: StringServer name for documentation
server_version: StringServer version
tool_count: usizeTotal number of tools
tools: Vec<ToolSummary>List of tool summaries
categories: Option<Vec<CategoryInfo>>Tools grouped by category (optional, for categorized generation)
Trait Implementations§
Source§impl Clone for IndexContext
impl Clone for IndexContext
Source§fn clone(&self) -> IndexContext
fn clone(&self) -> IndexContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexContext
impl Debug for IndexContext
Source§impl<'de> Deserialize<'de> for IndexContext
impl<'de> Deserialize<'de> for IndexContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IndexContext
impl RefUnwindSafe for IndexContext
impl Send for IndexContext
impl Sync for IndexContext
impl Unpin for IndexContext
impl UnwindSafe for IndexContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more