We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/oculairmedia/Letta-MCP-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
use std::error::Error;
use crate::{
file::source::FileSourceResult,
file::{FileSource, FileStoredFormat},
Format,
};
/// Describes a file sourced from a string
#[derive(Clone, Debug)]
pub struct FileSourceString(String);
impl<'a> From<&'a str> for FileSourceString {
fn from(s: &'a str) -> Self {
Self(s.into())
}
}
impl<F> FileSource<F> for FileSourceString
where
F: Format + FileStoredFormat + 'static,
{
fn resolve(
&self,
format_hint: Option<F>,
) -> Result<FileSourceResult, Box<dyn Error + Send + Sync>> {
Ok(FileSourceResult {
uri: None,
content: self.0.clone(),
format: Box::new(format_hint.expect("from_str requires a set file format")),
})
}
}