sequenceDiagram participant User participant App as MCP4RDF Service participant Val as Validator participant SHACL as SHACL Engine participant LLM as LLM (Llama-3.3) User->>App: Submit RDF/XML App->>Val: validate_rdf_tool() Val->>SHACL: Load template & validate alt Valid RDF SHACL-->>Val: Conforms Val-->>App: {conforms: true, status: "Valid"} App-->>User: Display success else Invalid RDF SHACL-->>Val: Violations found Val-->>App: {conforms: false, results: "errors..."} App->>LLM: get_ai_suggestions(errors, rdf) Note over LLM: Analyze errors
Generate fix steps LLM-->>App: Structured suggestions App->>LLM: get_ai_correction(errors, rdf) Note over LLM: Generate corrected
RDF/XML LLM-->>App: Fixed RDF/XML App-->>User: Display errors +
suggestions +
corrected RDF end