How to read file uploaded/attached by MCP client? #283
-
| When users upload documents, we need to extract their binary content for processing. | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            Tyler-R-Kendrick
          
      
      
        Apr 11, 2025 
      
    
    Replies: 1 comment
-
| This should be a community discussion topic instead of an issue since its just a question. @PederHP, do you agree? @wizd, this is already handled. When you implement a sampling handler on the client, you can implement whatever custom logic you want for ingested content. Look at Line 363 of ClientIntegrationTests to see how to set that up. To parse the data, just make sure the Request.Content is of the BlobContent type as parse as needed. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        PederHP
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
This should be a community discussion topic instead of an issue since its just a question. @PederHP, do you agree?
@wizd, this is already handled. When you implement a sampling handler on the client, you can implement whatever custom logic you want for ingested content. Look at Line 363 of ClientIntegrationTests to see how to set that up.
To parse the data, just make sure the Request.Content is of the BlobContent type as parse as needed.